a template function used for markers customization
webix.ui({
// provide your own Google API key
key:"AIzaSyAi0oVNVO-e603aUY8SILdD4v9bVBkmiTg",
// Map ID is required for advanced markers
mapId:"DEMO_MAP_ID",
view:"google-map",
// making markers interactive
template: function(item){
const element = webix.html.create("div", {class:"user"},
`<span class='webix_icon wxi-user'></span><span class='name'>${item.name}</span>`);
element.onclick = function(){
this.classList.toggle("active");
};
return element;
}
});
The template function takes the following parameters:
and returns the HTML element.