APIs
Log In
APIs

MapUtils.getTileBoundsFromBoundingBox

📘

Static method

MapUtils.getTileBoundsFromBoundingBox is static.
You can call it without actually instantiating the MapUtils class.

MapUtils.getTileBoundsFromBoundingBox(zoomLevel:Integer, bounds:google.maps.LatLngBounds)

Returns a hash with the following format :

{
		"NW" : google.maps.Point,
		"NE" : google.maps.Point,
		"SE" : google.maps.Point,
		"SW" : google.maps.Point		
}
function onYoumapsApiLoaded(){
  console.log("YoumapsAPI loaded!");
  var bounds = MapUtils.getTileBoundsFromBoundingBox(youmaps.map.getGoogleMap().getZoom(),
                                      youmaps.map.getGoogleMap().getBounds());
}

var mapOptions = {	
  center : new google.maps.LatLng(48.858386, 2.343435), // Paris,
  zoom : 11,
  minZoom : 6,
  maxZoom : 17,
  styles : mapStyles
};

var youmapsApi = new YoumapsAPI(
  {
    techID : <YOUR_TECH_ID>, 
    initMapboards : false,
    mapDivId : <YOUR_GOOGLE_MAP_DIV_ID>,
    mapOptions : mapOptions
  },
  onYoumapsApiLoaded
);