QuartzMap/admin/snippets/permalink_control.js

10 lines
430 B
JavaScript
Raw Normal View History

2024-03-16 23:03:30 +00:00
var CustomControlPermalink = L.Control.extend({
options: { position: 'topleft'},
onAdd: function(map) {
var container = L.DomUtil.create('div', 'leaflet-bar leaflet-control');
container.innerHTML = `<a href="#" id="fg-permalink" class="fa fa-share-alt"></a>`;
L.DomEvent.disableClickPropagation(container); // Prevent click events propagation to map
return container;
}
});
map.addControl(new CustomControlPermalink());