Skip to content

Emoji control Marker #1054

Dec 16, 2021 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

You need to copy the marker multiple times and then add each one a custom icon with markerStyle.

css:

.icon1-button {
  background-image: url('https://leafletjs.com/examples/custom-icons/leaf-red.png');
}

Js:

var icon1 = L.icon({
iconUrl: 'https://leafletjs.com/examples/custom-icons/leaf-red.png'
})

map.pm.Toolbar.copyDrawControl('Marker', {
  name: 'MarkerCopy',
  block: 'custom',
  title: 'Display text on hover button',
  className: 'icon1-button'
});
map.pm.Draw.MarkerCopy.setOptions({markerStyle: {icon: icon1}});

https://jsfiddle.net/dkjrLxsq/

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Ahmedgis1
Comment options

@Falke-Design
Comment options

@Ahmedgis1
Comment options

Answer selected by Ahmedgis1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants