Actions

Widget

Map: Difference between revisions

From Dragon Eye Atlas

No edit summary
No edit summary
Line 25: Line 25:
<div style="width: <!--{$width|escape:'html'|default:'50%'}-->; float:right; text-align:center">
<div style="width: <!--{$width|escape:'html'|default:'50%'}-->; float:right; text-align:center">
Biome: <span id="mapinfo-biome"></span>
Biome: <span id="mapinfo-biome"></span>
Realm: <span id="mapinfo-realm"></span>
Culture: <span id="mapinfo-culture"></span>
Religion: <span id="mapinfo-religion"></span>
</div>
</div>
<script>
<script>
Line 63: Line 66:
   });
   });


  map.on('mousemove', 'overlay', function(e) {
      console.log(e.features);
  });
});
});
</script>
</script>
</includeonly>
</includeonly>

Revision as of 16:38, 11 October 2019

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: 50%, 400px)
  • bounds - optional bounds array, replaces lon,lat,zoom
  • show, filter = show must be one of "realm", "culture", "religion" or "province" and filter must be the (short) name of the entity to highlight

Examples

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