Leaflet Maps examples: Difference between revisions

From Maps for MediaWiki
(Created page with "Leaflet maps can be customized using various parameters. This page lists examples. For an overview of available para...")
 
mNo edit summary
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Displaying Leaflet Maps|Leaflet maps]] can be [[Customizing Leaflet Maps|customized using various parameters]].  
[[Displaying Leaflet Maps|Leaflet maps]] can be [[Customizing Leaflet Maps|customized using various parameters]].  


This page lists examples. For an overview of available parameters and how to use them, see [[[[Customizing Leaflet Maps]].
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 ==
== Layers ==
Line 19: Line 23:
  |zoom=1
  |zoom=1
}}
}}
'''Note:''' [https://github.com/JeroenDeDauw/Maps/blob/master/DefaultSettings.php#L163-L226 Maps code repository → List of available layers.]


== Overlays ==
== Overlays ==
Line 85: Line 91:


<pre>
<pre>
{{#display_map:image layers=NewYorkSubway.jpg, NewYorkSubwaySmall.jpg | geojson=NewYorkSubway }}
{{#display_map:image layers=NewYorkSubway.jpg, NewYorkSubwaySmall.jpg }}
</pre>
</pre>


{{#display_map:
{{#display_map:
  |image layers=NewYorkSubway.jpg, NewYorkSubwaySmall.jpg
  |image layers=NewYorkSubway.jpg, NewYorkSubwaySmall.jpg
|service=leaflet
|height=300px
|scrollzoom=off
}}
<pre>
{{#display_map:image layers=NewYorkSubway.jpg | geojson=NewYorkSubway }}
</pre>
{{#display_map:
|image layers=NewYorkSubway.jpg
  |service=leaflet
  |service=leaflet
  |height=300px
  |height=300px
Line 95: Line 112:
  |geojson=NewYorkSubway
  |geojson=NewYorkSubway
  |zoom=3
  |zoom=3
}}
== Copy coords ==
Right-click on a marker to copy its coordinates.
<pre>
{{#leaflet:Hong Kong; Macau
|copycoords=yes
|zoom=10
}}
</pre>
{{#leaflet:Hong Kong; Macau
|copycoords=yes
|height=300px
|scrollzoom=off
|zoom=10
}}
}}

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...