APIs
Log In
APIs

YoumapsAPI.getMapboard

📘

Related REST API method

Take a look at getMapboardMapdataList.

YoumapsAPI.getMapboard(mapboardId:Integer, callback?:Function)

Retrieves and initializes the mapboard with the given id.
Adds the Mapboard instance to YoumapsAPI.mapboardArray and YoumapsAPI.mapboardHash if it hasn't been added yet.
Calls a callback function at the end if one has been defined and returns the Mapboard instance through this callback function.

function onYoumapsApiLoaded(){
  console.log("YoumapsAPI loaded!");
  youmapsApi.getMapboard(<MAPBOARD_ID>, onMapboardLoaded);
}

function onMapboardLoaded(mapboardInstance){
  console.log("Mapboard loaded " + mapboardInstance);
}

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