Related REST API method
Take a look at deleteMapdata.
Static method
Mapboard.deleteMapdata is static.
You can call it without actually instantiating the Mapboard class.
Mapboard.deleteMapdata(mapdataName:String, callback?:Function)
The mapdataName parameter here is the "name" property of your TileLayer | MarkerLayer | RasterLayer and NOT the "displayedName" property.
Deletes a mapdata and calls a callback function once the deletion is done.
function onYoumapsApiLoaded(){
console.log("YoumapsAPI loaded!");
Mapboard.deleteMapdata(<MAPDATA_NAME>, onMapdataDeleted);
}
function onMapdataDeleted(attributes){
console.log("Mapdata deleted");
}
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
);
