APIs
Log In
APIs

MapUtils.getTileCoordinates

📘

Static method

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

MapUtils.getTileCoordinates(latLng:google.maps.LatLng, zoomLevel:Integer)

Returns a google.maps.Point which represents the tiles coordinates corresponding to the given latitude & longitude.

function onYoumapsApiLoaded(){
  console.log("YoumapsAPI loaded!");
  var tileCoordinates = MapUtils.getTileCoordinates(new google.maps.LatLng(48.858386, 2.343435), youmaps.map.getGoogleMap().getZoom());
}

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
);