APIs
Log In
APIs

Map class

Map({ mapDivId:String, mapOptions?:google.maps.MapOptions })

Map is a JavaScript class available in the JavaScript library.
It encapsulates a Google Map and allows you to initialize and change your Google Map's options or properties easily.

Once YoumapsAPI is initialized, you can have access to this Map object as follows :

function onYoumapsApiLoaded(){
  console.log("YoumapsAPI loaded!");
  var mapObject = youmasApi.map;
}
  
var mapOptions = {	
  center : new google.maps.LatLng(48.858386, 2.343435), // Paris,
  zoom : 11,
  minZoom : 6,
  maxZoom : 17
};

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

You can also, if you wish to, initialize a Map object without actually loading YoumapsAPI :

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

var map = new Map({
  mapDivId : "map",
  mapOptions : mapOptions
});