Actions

Widget

Difference between revisions of "Markers"

From Dragon Eye Atlas

 
Line 23: Line 23:
<script>
<script>
map.on("load", function() {
map.on("load", function() {
  map.setLayoutProperty('<!--{$layer|escape:'html'|default:'POIs'}-->', 'visibility', 'visible');
   map.on('click', function(e) {
   map.on('click', function(e) {
      map.setLayoutProperty('<!--{$layer|escape:'html'|default:'POIs'}-->', 'visibility', 'visible');
 
       var features = map.queryRenderedFeatures(e.point, {
       var features = map.queryRenderedFeatures(e.point, {
         layers: ['<!--{$layer|escape:'html'|default:'POIs'}-->']
         layers: ['<!--{$layer|escape:'html'|default:'POIs'}-->']

Latest revision as of 09:51, 6 October 2019

Enable Clickable Markers

Parameters

  • layer - which layer to activate markers for. That layer must have "name" and "type" properties