APIs
Log In
APIs

MarkerLayer.getName

MarkerLayer.getName()

Returns the name of the marker layer.
The name of the marker layer can be considered as an ID.
In fact it is unique and is often needed to call some methods of the REST API.
Careful though, don't get it mixed up with the "displayedName" property.

function onYoumapsApiLoaded(){
  console.log("YoumapsAPI loaded!");
  var mapdataLayer = youmapsApi.getMapdata(<MAPDATA_ID>);
  var mapdataLayerName = mapdataLayer.getName();
}

function callback(){
	console.log("Mapdata layer displayed");
}

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