APIs
Log In
APIs

MarkerLayer.setMapdataGeneralSettings

📘

Related REST API method

Take a look at setMapdata.

MarkerLayer.setMapdataGeneralSettings(newName:String, zIndex:Integer, minZoom:Integer, maxZoom:Integer, callback?:Function)

Sets a new name, the z-index and the minimum/maximum zoom at which the mapdata layer should be visible on the map if displayed.
Calls a callback function once the changes have been successfully applied.

function onYoumapsApiLoaded(){
  console.log("YoumapsAPI loaded!");
  var mapdataLayer = youmapsApi.getMapdata(<MAPDATA_ID>);
	mapdataLayer.setMapdataGeneralSettings("New name", 20, 0, 21, callback);
}

function callback(){
	console.log("Changes applied");
}

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