sfEasyGMapPlugin 1.0.4 is out and the good news is : the plugin is the 24th most used symfony plugin among the 457 available on http://www.symfony-project.org/plugins/ ! We are now 5 official developers, not counting all the developers I work with who contribute indirectly.
It all started because I was amazed by the success of the Phoogle library on the Internet despite its limited number of functionalities. And since almost all my projects involved a Google Map I wanted to create a plugin containing all the core functionalities I always reuse. Now I am happy to see the popularity of the plugin and am looking forward further possible developments that will continue in the spirit of including as many core functionalities of Google Maps-based application in the plugin.
New functionalities for the moment include :
- More precise Mercator projections to convert GPS coordinates into Google Pixel coordinates and back GMapCoord::fromPixToLat, GMapCoord::fromLatToPix, etc.
- Added the GMapBounds::getBoundsContainingMarkers(…) function
- Added the GMap::centerAndZoomOnMarkers() function which enables to guess zoom and center of the map to fit the markers. Center is easy to guess. Zoom uses width and height of smallest bound, pixel width and height of the map and Mercator projection
- Added tomr’s contribution: it is now possible to add multiple controls to the map
- Added the GMapCoord::distance($coord1, $coord2) function which gives an estimation of the distance between two coordinates
- Added the very useful function $gMap-> getBoundsFromCenterAndZoom(…) which enables one to calculate server-side the bounds corresponding to specific center coordinates, zoom, and map size. This is the equivalent of the client-side map.setCenter(…,…);map.setZoom(…);map.getBounds(); It uses the Mercator projection formulas as used by the Google Maps
- A new function $gMapMarker->isInsideBounds($bounds)
- A lot of unit tests
- And two new samples
Please, feel free to suggest what you consider typical core functionalities of your Google Maps-based applications.
15 July 2009
Bonjour,
super ce plugin, il simplifie bien l’utilisation rapide de GMap.
En revanche, je n’arrive pas a rendre un marqueur “draggable” est-ce implementé dans votre plugin ou est-ce prévu dans uné mise à jour future ?
merci
14 h 15 min
15 July 2009
Il n’y a pas beaucoup de goodies client-side dans le plugin actuellement.
Pour l’instant on prévoyait dans une prochaine version l’inclusion des markers avec texte à l’intérieur et la customisation des contrôles. Mais le problème quand on intègre des options “javascript” dans une classe PHP c’est que ça devient très rapidement non maintenable si c’est mal pensé au départ. Cela demande donc un peu plus de temps que quelques heures de libre. Il ne faut donc pas trop compter dessus à court-terme… à moins de participer au développement du plugin
–
Summed up in English : including javascript goodies in a PHP class is a source of unmaintenable code if it is not well-architectured at the beginning. Therefore adding nice options like “draggable icons” will need to wait until I have enough time… unless somebody feels he can handle the challenge and is willing to contribute to the project
14 h 22 min
20 October 2009
Bonjour,
.
je vous souhaite d’abord un grand bravo pour le travail que vous avez fourni sur ce plugin. Il est absolument génial, et je ne peux m’en passer pour faire mes applications sur symfony.
Ensuite, je souhaiterais juste savoir si la v3.0 est en cours de de debuggage?
Etant donné que j’ai mis à jour le plugin et que j’ai suivi la documentation sur http://www.symfony-project.org/plugins/ , mes applications nécessitant l’affichage de googlemaps ne fonctionnent plus.
J’ai bien analysé les classes du plugins, et j’ai compris qu’il y avait beaucoup de changement par rapport aux anciennes versions, mais même en suivant la documentation mis à jour, mes applications ne fonctionnent pas.
Dois-je attendre un petit moment afin que vous compléter la doc? ou me confirmez-vous que tout marche? si c’est le dernier cas, alors je me mettrais à potasser le plugin
Bonne journée
17 h 40 min
20 October 2009
En fait la v3 n’est pas du tout backwards compatible, malheureusement. Pour deux raisons :
– je voulais profiter au maximum du nettoyage de l’API faite par Google pour nettoyer en même temps le plugin, ce qui nécessitait des changements d’architecture
– il n’y a pas d’intérêt évident à mettre un jour un site qui fonctionne déjà en v2.
Voilà, je vous conseille de ne PAS mettre à jour et d’utiliser la v3 que pour vos nouveaux projets.
–
v3 is not backwards-compatible unfortunately, for two reasons :
– Google did a good refactoring of their API with the v3 and I wanted to use the opportunity to do the same with the plugin, so this meant changes in the architecture
– There is no obvious reason to update a site that works with the v2
Therefore I recommend NOT to upgrade, and use the new plugin only on new projects.
18 h 08 min
19 November 2009
Bonjour Fabrice!, j’ai déjà posté sur un autre article, mais je reposte ici on ne sait jamais,
d’abord un grand merci pour le plugin, je souhaite utiliser les fonctions hide() et show() des marqueurs et je demande si elles sont intégrées dans votre plugin et comment faire
Merci d’avance
17 h 28 min
26 November 2009
D’abord bravo pour le boulot effectué.
J’ai une petite question, je souhaiterai faire des rollovers sur les marqueurs pour faire apparaître les infowindow au lieu d’avoir à cliquer dessus. Le seul pb c’est que quand on appelle addHtmlInfoWindow un événement click est automatiquement créé. Les addevent du coup ne me servent pas. Donc est-ce-possible à faire sans avoir à modifier le plugin?
Merci par avance
10 h 26 min
26 November 2009
http://trac.symfony-project.org/browser/plugins/sfEasyGMapPlugin/branches/v3/modules/sfEasyGMapPlugin/actions/actions.class.php
Le sample 2 montre comment ajouter un event custom sur un marker. Normalement ce n’est pas difficile à utiliser. Bon courage !
10 h 32 min
26 November 2009
Félicitation pour ce plugin bien pratique.
Serait il possible d’ajouter cette info dans le README, cela faciliterait l’installation :
Paramétrez vos clefs google dans apps/votreappli/config/app.yml
all:
google_maps_api:
keys:
http://www.yourdomain.com: ‘clee_google’
dev: ‘clee_google’
default: ‘clee_google’
On obtient les clefs google ici :
http://code.google.com/intl/fr/apis/maps/signup.html
20 h 25 min
30 November 2009
Tres pratique merci!
Une remarque : ce serait top d’ajouter dans la doc ou et comment renseigner l’API Key (dans le app.yml).
Merci!
13 h 28 min
2 February 2010
Bonjour, et merci pour tous ce que vous faites
j’ai deux questions :
1- le plugin fonctionne-t-il avec la version 1.4 de symfony?
2- est-il possible d’integrer google maps dans symfony sans le plugin?
14 h 02 min
1 December 2010
Hello, First great plugin thanks for this work,
but i have a question is it possible to change the maptype eg. satelite or hybrid?
thanks
10 h 55 min
1 December 2010
@altrano: the first paremeter of the GMap class constructor is an $options array. The “mapTypeId” key of this array defines the map type. Here you can find in Google’s documentation the basic map types :
http://code.google.com/apis/maps/documentation/javascript/maptypes.html#BasicMapTypes
For example :
$gmap = new GMap(array('mapTypeId' => 'google.maps.MapTypeId.HYBRID'));Cheers !
12 h 40 min