sfEasyGMapPlugin 1.0.4 out

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.

Mots-clefs : , , ,

6 commentaires sur “sfEasyGMapPlugin 1.0.4 out”

  1. MrMoins dit :

    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

  2. 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 :-)

  3. Tsjoe dit :

    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

  4. 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.

  5. ploufy dit :

    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

  6. 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 !

Laisser une réponse