Difference between revisions of "Markers"
From Dragon Eye Atlas
Line 26: | Line 26: | ||
var popup = new mapboxgl.Popup({ offset: [0, -15] }) | var popup = new mapboxgl.Popup({ offset: [0, -15] }) | ||
.setLngLat(feature.geometry.coordinates) | .setLngLat(feature.geometry.coordinates) | ||
.setHTML('<h3>' + feature.properties. | .setHTML('<h3>' + feature.properties.title + '</h3><p>' + feature.properties.description + '</p>') | ||
.addTo(map); | .addTo(map); | ||
}); | }); |
Revision as of 19:22, 5 October 2019
Enable Clickable Markers
Parameters
- layer - which layer to activate markers for
- title - which data field to use for pop-up title
- description - which data field to use for pop-up text