Skip to content
Logo Theodo

Symfony Google Maps API plugin : sfEasyGMapPlugin v1.0 is out!

Fabrice Bernhard2 min read

sfEasyGmapPlugin is a very easy to use Google Maps API plugin for symfony, inspired by the Phoogle class… but better :-)

A very simple version has been available for a few months but I have now finally released the 1.0 version, with the following new features :

- it is now sf1.2 compatible straight out of the box
- it has some unit tests
- the GMap constructor now takes an array of parameters, which is much more flexible and also more in the symfony coding spirit (Warning : the modification of the GMap constructor should break your application if you used the prior version of sfEasyGMapPlugin)
- there are interesting functions concerning Bounds :
- smallest enclosing bound
- propel criteria “in bounds”
- homothety transformation
- zoomOut transformation
- there are interesting functions concerning conversion from/to lat/lng to/from Google’s pixel coordinates system. These can be very useful if you want to guess the bounds knowing only the center lat/lng, the zoom level and the map’s width/height in pixels. They involve a few mathematical formulas that were not so straightforward, (since you need to understand how Google’s projection works) so trust me, these functions are valuable, even if they only concern power users.

I have also developed a few doctrine-specific functions which are unfortunately not available yet because not generic enough. I will try to release them in the next version.

The official symfony page is here : http://www.symfony-project.org/plugins/sfEasyGMapPlugin

Please feel free to comment on this work in progress !

Liked this article?