aboutsummaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js')
-rw-r--r--src/js/app/places.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/js/app/places.js b/src/js/app/places.js
index 9b915cb..5ed04d0 100644
--- a/src/js/app/places.js
+++ b/src/js/app/places.js
@@ -2,7 +2,20 @@ define(['leaflet'], function(L) {
// GeoJSON feature grouping
function returnMarker(feature, latlng) {
- return L.marker(latlng);
+ var marker = new L.marker(
+ latlng,
+ { opacity: 0.01 });
+ // bindTooltip was introduced in LeafletJS 1.0.
+ try {
+ marker.bindTooltip(
+ feature.properties.name,
+ {permanent: true });
+ } catch (e) {
+ if (console) {
+ console.warn('tooltip skipped (using an old Leaflet?)');
+ }
+ };
+ return marker;
};
var place = L.geoJson([], {