Leaflet Maps examples: Difference between revisions

From Maps for MediaWiki
mNo edit summary
mNo edit summary
(One intermediate revision by the same user not shown)
Line 115: Line 115:


== Copy coords ==
== Copy coords ==
Right-click on a marker to copy its coordinates.


<pre>
<pre>
{{#leaflet:Hong Kong
{{#leaflet:Hong Kong; Macau
  |copycoords=yes
  |copycoords=yes
  |zoom=10
  |zoom=10
Line 123: Line 125:
</pre>
</pre>


{{#leaflet:Hong Kong
{{#leaflet:Hong Kong; Macau
  |copycoords=yes
  |copycoords=yes
  |height=300px
  |height=300px

Revision as of 12:39, 18 March 2022

Leaflet maps can be customized using various parameters.

This page lists examples. For an overview of available parameters and how to use them, see Customizing Leaflet Maps.

Markers, Polygons, Lines, etc

See Displaying Leaflet maps

Layers

{{#display_map:
 |layers=OpenTopoMap,OpenStreetMap
 |zoom=1
}}
Loading map...

Note: Maps code repository → List of available layers.

Overlays

{{#display_map:Calais; Dover
 |overlaylayers=OpenSeaMap
}}
Loading map...

Fullscreen

{{#display_map:Berlin
 |fullscreen=on
}}
Loading map...

Resizable

{{#display_map:New York City
 |resizable=on
}}
Loading map...

Click target

{{#display_map:Berlin
 |clicktarget=https://www.google.com/maps/@%lat%,%long%,8z
 |zoom=8
}}
Loading map...

Image layers

{{#display_map:image layers=NewYorkSubway.jpg, NewYorkSubwaySmall.jpg }}
Loading map...
{{#display_map:image layers=NewYorkSubway.jpg | geojson=NewYorkSubway }}
Loading map...

Copy coords

Right-click on a marker to copy its coordinates.

{{#leaflet:Hong Kong; Macau
 |copycoords=yes
 |zoom=10
}}
Loading map...