Template:Fragoria Map

From FragoriaWiki

(Difference between revisions)
Jump to: navigation, search
Line 68: Line 68:
         };
         };
       }
       }
 +
 +
google.maps.event.addListener(map,'center_changed',function() { checkBounds(); });
 +
 +
function checkBounds() {   
 +
    if(! allowedBounds.contains(map.getCenter())) {
 +
      var C = map.getCenter();
 +
      var X = C.lng();
 +
      var Y = C.lat();
 +
 +
      var AmaxX = allowedBounds.getNorthEast().lng();
 +
      var AmaxY = allowedBounds.getNorthEast().lat();
 +
      var AminX = allowedBounds.getSouthWest().lng();
 +
      var AminY = allowedBounds.getSouthWest().lat();
 +
 +
      if (X < AminX) {X = AminX;}
 +
      if (X > AmaxX) {X = AmaxX;}
 +
      if (Y < AminY) {Y = AminY;}
 +
      if (Y > AmaxY) {Y = AmaxY;}
 +
 +
      map.setCenter(new google.maps.LatLng(-72, 13));
 +
    }
 +
}
       </script>
       </script>
<body onload="initialize()">   
<body onload="initialize()">   

Revision as of 22:08, 2 April 2015

Fragoria Map

Personal tools
Date/Time
Server & Cross

Super-Cross Server