Page 2 of 5

Re: Feature request: Geotagging

Posted: 12 Jun 2008, 11:25
by Markstag
I see you have updated this forum to phpbb, nice job! Some of the comments lost the url but that not an big deal.

could you please let me know what kind of code you are looking for so i can google for it... if u want i can zip some of my googlemap joomla extensions in a package... maybe you can use some code from existing joomla extensions..

Re: Feature request: Geotagging

Posted: 12 Jun 2008, 13:58
by Jan


I don't want to use some extensions (I still don't work it on it, because of time) but the idea is:


Go to Phoca Gallery - Gallery:
Click on image and edit it (or add new):

there will be two inputs more:

Long... _________
Lat... _________

and the button (like button for filename) to open the map. If the modal box will be open, the map will be open in the modal box (user must add the map key into the global configuration before)... the map will be displayed (no problem yet)...

BUT now there must be some javascript which can get the long and lat from the map, so if user click on the map, the logn and lat will be paste into the input forms and modal box will be closed...

So for me, I need to know the javascript code, which can take the long and lat from the google map ...

Jan

Re: Geotagging

Posted: 14 Jun 2008, 14:25
by Markstag
Yes you get the idea, how about this page http://code.google.com/apis/maps/docume ... vices.html...
I think that page contains the right code's to extract the long.&lat. from the map's center position.

Re: Geotagging

Posted: 14 Jun 2008, 14:46
by Markstag
This text explanes how to extract coordinates from the exif data.

Code: Select all

Extracting the coordinates from the image file
Picasa stores the coordinates inside a special area inside the image file called Exif, designed to store meta information about the images. It is usually used to store the camera model, the settings of the camera and the date when the picture was taken. Exif is a common standard and also allows us to include geotagging information. Extracting this information with PHP is quite easy because PHP provides us with an easy to use module for reading Exif data.

$exif = exif_read_data($filename, 'EXIF');

var_dump($exif['GPSLatitude']);
-> array(3) { [0]=> string(4) "41/1" [1]=> string(4) "53/1" [2]=> string(8) "25/1" }

var_dump($exif['GPSLatitudeRef']);
-> string(1) "N"

var_dump($exif['GPSLongitude']);
-> array(3) { [0]=> string(4) "12/1" [1]=> string(4) "29/1" [2]=> string(8) "32/1" }

var_dump($exif['GPSLongitudeRef']);
-> string(1) "E"

After obtaining the raw coordinates from the Exif data we need to convert it to something that we can use. I use two helper functions - one to convert the degrees, minutes and seconds to fractional decimal numbers - Exif stores numbers as actual fractions - and one to convert these three to a single fractional decimal degree. This is the format that we can use for all kinds of fun stuff. All of this is wrapped into a single function called getCoordinates(). The result of this function is an array containing the latitude and longitude of the specified file.

if ($c = getCoordinates($filename)) {
$latitude = $c[0];
$longitude = $c[1];
source:http://www.designfloat.com/Programming/ ... ed_photos/

To get the right long-lat i gues you need to use this methode: http://code.google.com/apis/maps/docume ... ml#GLatLng

Also take an look at this website: http://econym.googlepages.com/index.htm

Re: Geotagging

Posted: 14 Jun 2008, 15:49
by Jan
thank you for the infos, Jan

Re: Geotagging

Posted: 20 Jun 2008, 13:32
by Markstag
Is this feature planed for the next release of Phoca gallery?

I do hope so 8)

Re: Geotagging

Posted: 20 Jun 2008, 15:59
by Jan
This feature is planed.. I have all neccessary info for doing it, the problem is I have still no time ...

:(

Jan

Re: Geotagging

Posted: 26 Jun 2008, 00:16
by Jan
See:

https://www.phoca.cz/phocagallery/demo/i ... llery-wine

Click on the Earth (world) icon.

Jan

Re: Geotagging

Posted: 26 Jun 2008, 12:27
by Markstag
Great job Jan, I can't wait to try this future! is there an way of selecting the zoom level and map type at the backend?

The world icon does look good to :wink:

How about showing the picture's thumbnail in the pointer's balloon? so if you click on the pointer you will see the image thumbnail in the balloon. maybe with description?
This way Phoca gallery could be used for many more things then only showing pictures but admins can actually use it to just show locations.

And did you thing about an total map overview? so you can make an new menu item that shows an map that displays all pointers that you have made by the geotags, show them by category. or all.

And again i want to to thank you for your outstanding job creating these tools. :twisted:

Re: Geotagging

Posted: 26 Jun 2008, 13:22
by Jan
How about showing the picture's thumbnail in the pointer's balloon? :D and if you click on the picture in the balloon, you get the detail view in the balloon, where you can click on the balloon map, in the balloon map you can click on balloon balloon thtumbnail and in the balloon balloon thumbnail there will be balloon balloon map and in this map the balloon balloon balloon thumbnail ... :D

And did you thing about an total map overview? No yet, but it can be good idea to see the map with markers as categories

Jan