mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-02 04:23:57 +00:00
show tooltip on map
This commit is contained in:
@@ -18,7 +18,7 @@ const getMapExport = (geoJson) => {
|
|||||||
leaflet
|
leaflet
|
||||||
.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
maxZoom: 19,
|
maxZoom: 19,
|
||||||
attribution: '© OpenStreetMap',
|
attribution: '<a href="https://dbgate.org" title="Exported from DbGate">DbGate</a> | © OpenStreetMap',
|
||||||
})
|
})
|
||||||
.addTo(map);
|
.addTo(map);
|
||||||
|
|
||||||
@@ -47,6 +47,7 @@ const getMapExport = (geoJson) => {
|
|||||||
// does this feature have a property named popupContent?
|
// does this feature have a property named popupContent?
|
||||||
if (feature.properties && feature.properties.popupContent) {
|
if (feature.properties && feature.properties.popupContent) {
|
||||||
layer.bindPopup(feature.properties.popupContent);
|
layer.bindPopup(feature.properties.popupContent);
|
||||||
|
layer.bindTooltip(feature.properties.popupContent);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -123,6 +123,7 @@
|
|||||||
// does this feature have a property named popupContent?
|
// does this feature have a property named popupContent?
|
||||||
if (feature.properties && feature.properties.popupContent) {
|
if (feature.properties && feature.properties.popupContent) {
|
||||||
layer.bindPopup(feature.properties.popupContent);
|
layer.bindPopup(feature.properties.popupContent);
|
||||||
|
layer.bindTooltip(feature.properties.popupContent);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user