Monday, April 16, 2012

Using Google API V3, How do I lock map boundaries to a specific location?

How do I lock the map boundaries to a specific location in Google Map API v3? So the user cannot drag to another place, while he can still zoom in and out?



To be more clear, I need my view box to show/view just my country only so the user cannot drag to other countires.



Thanks.





2 comments:

  1. You can use the google polygon class for that.

    ReplyDelete
  2. see irahuldev.blogspot.com for the code.

    ReplyDelete