Widget:OpenStreetMap: Unterschied zwischen den Versionen
Aus Stratum 0
(let's see if this does https for larsan) |
(documentation, y u no copypastable ლ(ಠ益ಠლ)) |
||
Zeile 18: | Zeile 18: | ||
<script> | <script> | ||
map = new OpenLayers.Map("mapdiv"); | map = new OpenLayers.Map("mapdiv"); | ||
− | map.addLayer(new OpenLayers.Layer.OSM("OpenStreetMap", "https:// | + | map.addLayer(new OpenLayers.Layer.OSM("OpenStreetMap", [ |
+ | "https://c.tile.openstreetmap.org/${z}/${x}/${y}.png", | ||
+ | "https://b.tile.openstreetmap.org/${z}/${x}/${y}.png", | ||
+ | "https://a.tile.openstreetmap.org/${z}/${x}/${y}.png" | ||
+ | ])); | ||
var lonLat = new OpenLayers.LonLat(<!--{$lon|validate:float|default:0}-->,<!--{$lat|validate:float|default:0}-->) | var lonLat = new OpenLayers.LonLat(<!--{$lon|validate:float|default:0}-->,<!--{$lat|validate:float|default:0}-->) | ||
.transform( | .transform( |
Version vom 4. November 2015, 20:19 Uhr
This widget allows you to add an OpenStreetMap widget to your wiki page.
Using this widget
To insert this widget, use the following code:
{{#widget:OpenStreetMap|lat=<latitude>|lon=<longitude>|zoom=<zoom>}}
Parameters
- lat, lon - latitude and longitude
- zoom - zoom, ranging from 1 (overview) to 18 (detailed)
- height, width: height and width of the map widget. Default height is 250px, default width is auto.