Marker.applyStyle(style:JSON).
Sets the marker style.
The JSON parameter can contain the following fields :
{
markerWidth : 20, //number
markerHeight : 30, //number
fillColor : "#ffffff", //string
fillOpacity : 0.3, //number
strokeColor : "#ffffff", //string
strokeWeight : 2, //number
strokeOpacity : 0.7, //number
markerRotation : 1, //number
markerTitle : "Title", //string
markerLabel : {text : "Label"}, //google.maps.MarkerLabel
iconUrl : "https://google-developers.appspot.com/maps/documentation/javascript/examples/full/images/beachflag.png", //string
markerAnimation : google.maps.Animation.BOUNCE //google.maps.Animation constant
}
function onYoumapsApiLoaded(){
console.log("YoumapsAPI loaded!");
var markerLayer = youmapsApi.getMapdata(<MAPDATA_ID>);
markerLayer.display();
var markers = markerLayer.getMarkers();
markers[0].applyStyle({
markerWidth : 20, //optional
markerHeight : 30, //optional
fillColor : "#ffffff",
fillOpacity : 0.3,
strokeColor : "#ffffff",
strokeWeight : 2,
strokeOpacity : 0.7,
iconUrl : "https://google-developers.appspot.com/maps/documentation/javascript/examples/full/images/beachflag.png",
markerAnimation : google.maps.Animation.BOUNCE
});
}
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
);
