Closed gabriellangon closed 1 year ago
Great question - unfortunately the plugin doesn't currently support customising the user pin declaratively. I'll keep this issue open as an enhancement request.
For now you can do this programmatically using JavaScript, e.g.:
var mymap = $("#map_mymap").reportmap("instance").map,
mypos = new google.maps.LatLng(-31.82531,115.84366),
myicon = 'https://mt.googleapis.com/vt/icon/name=icons/spotlight/'
+ 'spotlight-waypoint-blue.png'
+ '&scale=2.0';
var mypin = new google.maps.Marker({
map : mymap,
position : mypos,
title : "Hello world",
icon : myicon
});
You will need to set the Static ID on your map region (e.g. "xyz"), then refer to $("#map_xyz")
in the first line.
The code works for me. Thanks for you answer !
Hi, How can I place marker on a map with a custom icon using the plugin API ? gotoPosByString API or Plugin Action Place Marker doesn't offer this possibility.
Is there a possibility to change the default red marker icon?
Thanks for your help.