js/RASPtableLeaf.js
/* Called when idle - end of drag or zoom change
 * Centre map if outside ViewPort
 */
Called when idle - end of drag or zoom change
Centre map if outside ViewPort
Called when idle - end of drag or zoom change Centre map if outside ViewPort
function constrainMap(E)
{
  var VPbounds, URL;
  while(!(VPbounds = map.getBounds()))
    ; 
  if( !VPbounds.intersects(corners.Bounds[resolution])){
    if(confirm("Map Outside ViewPort\nReCentre?")){
      map.setView(corners.Centre[resolution]);
    }
  }
  centre = map.getCenter();
  zoom = map.getZoom();
  doUrl();
}
function constrainMap ( E ) { var VPbounds , URL ; while ( ! ( VPbounds = map . getBounds ( ) ) ) ; if ( ! VPbounds . intersects ( corners . Bounds [ resolution ] ) ) { if ( confirm ( "Map Outside ViewPort\nReCentre?" ) ) { map . setView ( corners . Centre [ resolution ] ) ; } } centre = map . getCenter ( ) ; zoom = map . getZoom ( ) ; doUrl ( ) ; }
Called when idle - end of drag or zoom change
 Centre map if outside ViewPort
Called when idle - end of drag or zoom change Centre map if outside ViewPort
// Hmmm! Busy wait? // Check that overlay corners are within ViewPort