Help:Creating a map centered on the coordinate for your page, with nearby 'pages' shown

Semantic extension(s): Semantic Maps
Further extension(s): Variables
Keyword(s): maps · nearby



Draw a map centred on the coordinate for the current page, with nearby 'pages' also show.


For convenience we use the excellent Variables extension, and of course, the the Semantic Maps extension.

This code is suitable for putting in a template. It assumes the template is passed some 'geocode-able' fields, address, city, and country. I've used some default values for those fields below, so it will work without being invoked via a template call.

  |{{#geocode:{{{address|Largo Gerolamo Gaslini, 5}}},{{{City|Genova}}},{{{country|Italy}}}|nominatim}}

{{#set: Has coordinates = {{#var:coord}} }}

<div style="float: right; width:45%">
  [[Category: Laboratory]]
  |?Has coordinates 
  | format = map
  | center = {{#var:coord}}
  | zoom = 13