pelloquin.com

the web factory

Joomla extensions

Quality Joomla extensions




Accueil arrow Blog arrow How to limit the pan in google maps
How to limit the pan in google maps
Écrit par Cédric Pelloquin   
04-11-2009

Image If you want to limit the range of panoramic that the user is allowed to use on your google map, you can add listeners for the "move" event, and intercept any operations that go outside the permitted region.

What I've done for the position is to specify an allowable region in GLatLngBounds() format (from South-West to North-East). Then I check that the upper edge of the google map, is located less north than the licensed area. The same process is used for other directions.

There are other methods to control the center of the map is in the licensed area.

In my example I also blocked the zoom.

Sample : How to limit the pan in google maps

Dernière mise à jour : ( 06-11-2009 )
 

Partenaire Suisse

annuaire web suisse de référencement Vous cherchez un bon annuaire:

  • Suisse?
  • Pagerank de 4?

L'annuaire web suisse de référencement est pour vous!

login






Mot de passe oublié ?
Pas encore de compte ? Enregistrez-vous
Joomla Templates by Joomlashack