Difference between revisions of "Markers"
From Dragon Eye Atlas
Line 2: | Line 2: | ||
== Enable Clickable Markers == | == Enable Clickable Markers == | ||
=== Parameters === | === Parameters === | ||
* layer - which layer to activate markers for | * layer - which layer to activate markers for. That layer must have "name" and "type" properties | ||
</noinclude> | </noinclude> | ||
Line 26: | Line 24: | ||
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(feature.properties. | .setHTML([[feature.properties.name]]) | ||
.addTo(map); | .addTo(map); | ||
}); | }); |
Revision as of 01:56, 6 October 2019
Enable Clickable Markers
Parameters
- layer - which layer to activate markers for. That layer must have "name" and "type" properties