Skip to content

Numbered markers #1450

Closed Answered by Falke-Design
jorge-plaza asked this question in Questions & Help
Discussion options

You must be logged in to vote

After placing a Marker and continuing with drawing, the event pm:drawstart will be fired on the map. Then you can set the new icon over the options and apply the new style.

map.on('pm:drawstart', (e)=>{
   if(e.shape === 'Marker') {
      map.pm.setGlobalOptions({markerStyle : { icon: YOUR_DIV_ICON } });
      map.pm.Draw.Marker.setStyle();
   }
});

I haven't tested this code but it should help you enough

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jorge-plaza
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants