Remove permalink and add tooltip
This commit is contained in:
@@ -46,13 +46,16 @@ $( document ).ready(function() {
|
||||
});
|
||||
|
||||
poi_layer = L.marker([-46.407, 51.766], {draggable: true}).addTo(mymap);
|
||||
poi_layer.bindTooltip("Glissez moi au bon endroit.", {permanent: true, direction: 'top'}).openTooltip();
|
||||
|
||||
mymap.on('click', function(e){
|
||||
poi_layer.unbindTooltip();
|
||||
poi_layer.setLatLng(e.latlng);
|
||||
$("#lat").val(e.latlng.lat);
|
||||
$("#lon").val(e.latlng.lng);
|
||||
})
|
||||
poi_layer.on('move', function(e){
|
||||
poi_layer.unbindTooltip();
|
||||
$("#lat").val(e.latlng.lat);
|
||||
$("#lon").val(e.latlng.lng);
|
||||
})
|
||||
@@ -61,9 +64,8 @@ $( document ).ready(function() {
|
||||
iconSize: [24, 24],
|
||||
iconAnchor: [12, 12]
|
||||
});
|
||||
|
||||
$("#type_selector label").click(function(e) {
|
||||
console.log(e);
|
||||
poi_layer.unbindTooltip();
|
||||
poiicon.options.iconUrl = e.currentTarget.firstChild.currentSrc;
|
||||
poi_layer.setIcon(poiicon);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user