Widget:OpenStreetMap: Difference between revisions

From Nottinghack Wiki
Jump to navigation Jump to search
Marcus (talk | contribs)
mNo edit summary
Marcus (talk | contribs)
Map example is now working.
Line 4: Line 4:
You can insert a map with the following wiki code:
You can insert a map with the following wiki code:


  <nowiki>{{#widget:OpenStreetMap|lat=13.41|lon=52.52|zoom=15}}</nowiki>
  <nowiki>{{#widget:OpenStreetMap|lat=52.94762|lon=-1.1467897|zoom=16}}</nowiki>


=== Parameters ===
=== Parameters ===
Line 27: Line 27:


== Example ==
== Example ==
{{#widget:OpenStreetMap|lat=52.94762|lon=-1.1467897|zoom=16}}
</noinclude><includeonly><!--{counter name="openStreetMapDivID" assign="openStreetMapDivID"}--><div id="openStreetMap<!--{$openStreetMapDivID|escape:'html'}-->" style="width:<!--{$width|escape:'html'|default:'400px'}-->; height:<!--{$height|escape:'html'|default:'400px'}-->;"></div><!--{if $openStreetMapDivID == 1}--><script type="text/javascript" src="http://www.openlayers.org/api/OpenLayers.js"></script><!--{/if}--><script type="text/javascript">
</noinclude><includeonly><!--{counter name="openStreetMapDivID" assign="openStreetMapDivID"}--><div id="openStreetMap<!--{$openStreetMapDivID|escape:'html'}-->" style="width:<!--{$width|escape:'html'|default:'400px'}-->; height:<!--{$height|escape:'html'|default:'400px'}-->;"></div><!--{if $openStreetMapDivID == 1}--><script type="text/javascript" src="http://www.openlayers.org/api/OpenLayers.js"></script><!--{/if}--><script type="text/javascript">
(function (){
(function (){

Revision as of 21:51, 11 March 2011

This widget allows you to embed OpenStreetMap in a wiki page.

Using this widget

You can insert a map with the following wiki code:

{{#widget:OpenStreetMap|lat=52.94762|lon=-1.1467897|zoom=16}}

Parameters

width
Width of the embedded map (default 400px).
height
Height of the embedded map (default 400px).
lat
The x-coordinate for the centre of the view.
lon
The y-coordinate for the centre of the view.
units
The type of map units used for the coordinates (defaults to 'degrees').
zoom
The zoom level (default 15).
showmarker
Adds a visual marker to the center of the map (default false).
poifile
Specifies a file containing points of interest (POI) that should be overlaid on the map. See the file format description in [1].
poititle
The title of the POI layer (default 'Points of interest').

Example

© OpenStreetMap