Hi,
I am trying to to some improvement of googleMap plugin.
In order to do that, I have some questions:
1/ you replace ',' by '.' in exifs data 3 times in the plugin :
- in googleMap.php, function getGeoCoord()
- in GoogleMap/googleMap.php (as a hack of original class),
- function getAddMarkersJS()
- function getMapJS()
with 3 times ? the first one in googleMap.php seems to be enough , don't you think ?
2/in googleMap.php, function getGeoCoord()
why did you write that code ?
`
$lat_c = explode('.',str_replace(',', '.', $exif['EXIFGPSLatitude']));
$lat_f = round((float) abs($lat_c[0])+$lat_c[1]/pow(10,strlen($lat_c[1])),5);
`
why this code in not enough to convert string in float:
`$lat_f = round((float) (str_replace(',', '.', $exif['EXIFGPSLatitude'])),5);`
3/ in googleMap.php, function getGeoCoord()
`if (strtoupper(
@$exif['EXIFGPSLatitudeRef']{0}) == 'S')`
can you explain that code ? I amunable to understand what it means...
Comments
I have created an issue on github (https://github.com/zenphoto/zenphoto/issues/238) to improve googleMap plugin.
In a first time, I wished to have a better behaviour when a lot of photos have a close location. In that case, display only a single pin, and after a clic on the pin, allows to navigate between thumbnails in the info windows.
Sbillard has made some improvements to enable clustering of pictures.
On my side, I have a look on the Net and I have found an interesting library OverlappingMarkerSpiderfier which enables to separate near Markers.
I have tried to implement that library with existing plugin but the google map api v3 class is a headhach and is very bad coded (I am not an php expert, but many part of the code are unreadable and ununderstandable...)
So I sought for another google map api v3 class and I have rewrited the plugin.
There are some improvements with this new release :
- allows clustering, with a parameter 'max zoom level' in admin
- allows separation of very close markers (like panoramio in google earth)
- allows a stylized info window : displays title and desc of picture, displays a thumbnail sized thumbnail independent from the thumbnails size sets for the theme)
- allows autoclose info windows when click on another pin or click on the map.
sbillard andacrylian, I hope you will be interested by this rewrite of the plugin and it will replace existing one.
you can see it in action here :
http://dev.vincentbourganel.fr/20120623-randonnee-vercors/
how should I do to give you this plugin ?
I closely followed the existing code (I reproduce functions, and the map file with colorbox option).
There are some strings added or modified to traduct.
The only thing I have not managed to do is use the parameter "callback".
Of course, for replacement of existing official plugin, there should be some code revue by you, and some tests by multiple users (everything works well for me on the current version 1.4.5).
If you are OK, you could reopen the existing ticket on github and then I will add zip file with the plugin files.
https://github.com/vincent3569/GoogleMap
let me know...
of course, I am OK to not include this release in the 1.4.4 stream.
zenphoto users are free to download it and replace initial plugin in their installation.
would you please reopen my initial ticket (https://github.com/zenphoto/zenphoto/issues/238) ?
a new feature of this plugin could be the following :
for grouped marker, have a "look like" Panoramio in Google Earth (infoWindow with a slideshow between all thumbnails).
the scenario to implement this new feature : if somebody could help me to this new feature...