Actions

Widget

Difference between revisions of "Infomap"

From Dragon Eye Atlas

 
(3 intermediate revisions by the same user not shown)
Line 41: Line 41:
map.on("load", function() {
map.on("load", function() {
   map.setLayoutProperty('realms-labels', 'visibility', 'none');
   map.setLayoutProperty('realms-labels', 'visibility', 'none');
  map.setLayoutProperty('POIs', 'visibility', 'none');


   // Create a popup, but don't add it to the map yet.
   // Create a popup, but don't add it to the map yet.
Line 56: Line 57:
         // based on the feature found.
         // based on the feature found.
         popup.setLngLat(e.lngLat.wrap())
         popup.setLngLat(e.lngLat.wrap())
             .setHTML(e.features[0].properties.biome)
             .setHTML(e.features[0].properties.Biome)
             .addTo(map);
             .addTo(map);
       }
       }

Latest revision as of 01:22, 28 November 2019

Mapbox-GL-JS Information Map Widget

Parameters

  • lon, lat, zoom - longitude, latitude and zoom for the map (defaults: 1, 30, 4)
  • width, height - dimensions of the map itself on the page, in px or % (defaults: 100%, 600px)

Examples

  • {{#widget:Mapbox|bounds=[[0, 25], [8, 31]]}}
  • {{#Widget:Mapbox|lat=31|lon=-15.5|zoom=3}}