I am trying to recreate the panorama constraint behavior as shown here: http://econym.org.uk/gmap/example_range.htm
Unfortunately, it uses the API version 2 instead of the current version 3. I update the commands so that they are current, but I think I might have missed something because it does not work:
<html> <body> <script type="text/javascript" src="http://meyouand.us/scripts/jquery-1.4.4.min.js"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> $(document).ready(function() { </script> <body> <div id="gmap" style="width: 480px; height: 440px;"></div> </body> </html>
Will anyone think of giving another set of eyes to see if I missed something ?: D
(There is another updated version 3 code here in StackOverflow titled βHow do I restrict panning in the Google Maps API V3?β However, this behavior visually βsnapsβ backwards, and not just restricts movement outside borders.)
Marc p
source share