APIs
Log In
APIs

Mapboard.getMapdataAttributes

📘

Related REST API method

Take a look at getMapdataAttributes.

📘

Static method

Mapboard.getMapdataAttributes is static.
You can call it without actually instantiating the Mapboard class.

Mapboard.getMapdataAttributes(mapdataName:String, callback?:Function)

The mapdataName parameter here is the "name" property of your TileLayer | MarkerLayer | RasterLayer and NOT the "displayedName" property.
Returns through a callback function a list of all the attribute names along with their types for the given mapdata.

function onYoumapsApiLoaded(){
  console.log("YoumapsAPI loaded!");
  Mapboard.getMapdataAttributes(<MAPDATA_NAME>, onAttributesLoaded);
}

function onAttributesLoaded(attributes){
  console.log("Attributes retrieved " + attributes);
}

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