Difference between revisions of "Map"

From Dragon Eye Atlas

Line 89: Line 89:

   map.on('click', 'villages-labels', function(e) {
   map.on('click', 'villages-labels', function(e) {
      var name = e.features[0];
      // this could probably improved with the proper mediawiki magic word, but need to figure out which one and how to make it work in widgets
      window.location.href = '/dragoneye/atlas/'+name;
  map.on('click', 'POIs', function(e) {
       var name = e.features[0];
       var name = e.features[0];

Revision as of 14:09, 1 January 2020

Map Widget

New and unified map widget.


  • 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
  • overlay - activate color overlay, most be one of "realm", "culture, "religion" or "province"
  • info - set to show the information overlay/popup on click


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