APIs
Log In
APIs

MarkerLayer.getFields

MarkerLayer.getFields()

Returns an array containing all the field names (attribute names) of this mapdata, along with their types and lengths.
This array could for example look like this :

[
  {
  	fieldName   : "field1" ,	
    fieldType   : "String" ,
    fieldlength : 25
  },
  {
  	fieldName   : "field2" ,	
    fieldType   : "Integer" ,
    fieldlength : 11
  }
]
function onYoumapsApiLoaded(){
  console.log("YoumapsAPI loaded!");
  var mapdataLayer = youmapsApi.getMapdata(<MAPDATA_ID>);
	var mapdataLayerFields = mapdataLayer.getFields();
}

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