Difference between revisions of "Maps"
CampMaster (talk | contribs) |
(→Maps to be done) |
||
(110 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | {{#display_map:center= | + | == Example map with a marker == |
+ | |||
+ | <div style="max-width:600px;"> | ||
+ | {{#display_map: | ||
+ | -15.214232, 50.076107~[[Hotel Fitiavana]]~~; | ||
+ | |type=satellite | ||
+ | |service=google | ||
+ | |width=auto | ||
+ | |height=400 | ||
+ | |zoom=18 | ||
+ | |controls=pan, zoom, type, scale | ||
+ | |searchmarkers=al| | ||
+ | |copycoords=yes | ||
+ | }} | ||
+ | </div> | ||
+ | |||
+ | <pre><nowiki><div style="max-width:600px;"> | ||
+ | {{#display_map: | ||
+ | -15.214232, 50.076107~[[Hotel Fitiavana]]~~; | ||
+ | |type=satellite | ||
+ | |service=google | ||
+ | |width=auto | ||
+ | |height=400 | ||
+ | |zoom=18 | ||
+ | |controls=pan, zoom, type, scale | ||
+ | |copycoords=yes | ||
+ | }} | ||
+ | </div></nowiki></pre> | ||
+ | |||
+ | == Example map with a line and markers == | ||
+ | |||
+ | {{#display_map: | ||
+ | -13.1918264553,49.0500772744~[[Noor Hotel]]~~; | ||
+ | -12.8073644824,48.9577304944~Bobasakoa~~; | ||
+ | | lines= | ||
+ | -13.1918264553,49.0500772744: | ||
+ | -12.8073644824,48.9577304944 | ||
+ | |service=leaflet | ||
+ | |height=500 | ||
+ | |center=-12.9640116915,48.9870830812 | ||
+ | |zoom=10 | ||
+ | |enablefullscreen=yes | ||
+ | }} | ||
+ | |||
+ | <pre><nowiki>{{#display_map: | ||
+ | -13.1918264553,49.0500772744~[[Noor Hotel]]~~; | ||
+ | -12.8073644824,48.9577304944~Bobasakoa~~; | ||
+ | | lines= | ||
+ | -13.1918264553,49.0500772744: | ||
+ | -12.8073644824,48.9577304944 | ||
+ | |service=leaflet | ||
+ | |height=500 | ||
+ | |center=-12.9640116915,48.9870830812 | ||
+ | |zoom=10 | ||
+ | |enablefullscreen=yes | ||
+ | }}</nowiki></pre> | ||
+ | |||
+ | Note: More than one map a page will fail on mobile (Minerva) displays of the wiki. | ||
+ | |||
+ | == lines == | ||
+ | |||
+ | Lines between coordinates are used to make a path. | ||
+ | |||
+ | | lines= | ||
+ | -13.1918264553,49.0500772744: | ||
+ | -12.8073644824,48.9577304944 | ||
+ | |||
+ | The default colour/thickness of line are red/1px. | ||
+ | |||
+ | The thickness, colour and opacity of the line can be redefined by the syntax: | ||
+ | |||
+ | | lines= | ||
+ | -13.1918264553,49.0500772744: | ||
+ | -12.8073644824,48.9577304944~Popup title~Popup text~green~0.42~10 | ||
+ | |||
+ | Note: Thickness, colour and opacity only take effect when preceded by a popup title and text. The syntax is:<br> | ||
+ | <tt>~Popup title~Popup text~Popup text~Line opacity~Line thickness</tt> | ||
+ | |||
+ | However, the popup when clicking the line only appears with google maps (not leaflet). | ||
+ | |||
+ | == copycoords == | ||
+ | |||
+ | Right-click on map to copy coordinates. | ||
+ | |||
+ | copycoords=yes | ||
+ | |||
+ | == service == | ||
+ | |||
+ | |service=leaflet | ||
+ | or | ||
+ | |service=google | ||
+ | |||
+ | == icon == | ||
+ | |||
+ | |icon=<nowiki>https://www.madacamp.com/images/madagascar/Green_marker.png</nowiki> | ||
+ | |||
+ | Or on a p/market basis: | ||
+ | |||
+ | -15.214232, 50.076107~[[Hotel Fitiavana]]~~<nowiki>https://www.madacamp.com/images/madagascar/Green_marker.png</nowiki>; | ||
+ | |||
+ | == type == | ||
+ | |||
+ | |type=satellite | ||
+ | |||
+ | the initial type of map (roadmap, satellite, hybrid, terrain) | ||
+ | |||
+ | == label == | ||
+ | |||
+ | |label=text | ||
+ | |||
+ | standard text to display in all popups without text | ||
+ | |||
+ | == types == | ||
+ | |||
+ | types=roadmap, satellite, hybrid, terrain | ||
+ | |||
+ | map options included in the control | ||
+ | |||
+ | If omitted, all options are included | ||
+ | |||
+ | minimum one option is required for constraint to take effect | ||
+ | |||
+ | == controls == | ||
+ | |||
+ | |controls=pan, zoom, type, scale | ||
+ | |||
+ | pan, zoom, type, scale, streetview, rotate | ||
+ | |||
+ | == zoom == | ||
+ | |||
+ | Zoom levels are between 1 and 20 | ||
+ | |||
+ | |zoom=18 | ||
+ | |||
+ | == width == | ||
+ | |||
+ | pixels or percentage | ||
+ | |||
+ | |width=auto | ||
+ | |||
+ | auto will stretch to the containing block | ||
+ | |||
+ | == height == | ||
+ | |||
+ | |height=400 | ||
+ | |||
+ | == centre (or center) == | ||
+ | |||
+ | The location which should be the centre of the map | ||
+ | |||
+ | |centre=-14.254318, 50.157051 | ||
+ | or | ||
+ | |center=-14.254318, 50.157051 | ||
+ | |||
+ | If centre is omitted, center depends on the placemarks. | ||
+ | |||
+ | If zoom is omitted, zoom level will be set to fit the placemarks. | ||
+ | |||
+ | If there is only one placemark, zoom level has to be defined for the map to show. | ||
+ | |||
+ | == searchmarkers == | ||
+ | |||
+ | Add a filter search field for maps with many markers | ||
+ | |||
+ | |||
+ | == enablefullscreen == | ||
+ | |||
+ | |enablefullscreen=no | ||
+ | |enablefullscreen=yes | ||
+ | |||
+ | If omitted, no fullscreen label is shown. | ||
+ | |||
+ | Fullscreen mode is not working well on desktop and ipad. | ||
+ | |||
+ | Fullscreen works better for leaflet maps but which do not have satellite mode | ||
+ | |||
+ | <b>NOTE:</b> Don't use this on maps service=google as it's broken. | ||
+ | |||
+ | |||
+ | Instead, enabled: | ||
+ | mapOptions.fullscreenControl = $.inArray('type', options.controls) != -1; | ||
+ | |||
+ | .. in jquery.googlemap.js for all Google maps to display the native Google full-screen toggle in the right corner. | ||
+ | |||
+ | == resizable == | ||
+ | |||
+ | |||
+ | Makes the map resizable with the mouse at the map edges on a regular PC | ||
+ | |||
+ | '''Note:''' Don't use this option as it causes a Javascript error that brakes the mobile display menu on Android on combination with Google's native fullscreen toggle. | ||
+ | |||
+ | == image in placemark == | ||
+ | |||
+ | <pre><nowiki> | ||
+ | * -14.273700, 50.176600~[[File:Chez_Orlance_003.jpg|left|70px|]]<br>Chez Orlance~~; | ||
+ | </nowiki></pre> | ||
+ | == Documentation == | ||
+ | |||
+ | * https://www.mediawiki.org/wiki/Topic:Ve0pru8m3ygl58vt - loading failure on Minerva | ||
+ | ** https://github.com/JeroenDeDauw/Maps/issues/598 | ||
+ | * https://maps.extension.wiki/wiki/Google_Maps_SMW_queries | ||
+ | * http://www.coastalwiki.org/wiki/Help:Semantic_maps | ||
+ | * https://www.mediawiki.org/wiki/Extension_talk:Maps | ||
+ | * https://maps.extension.wiki/wiki/Customizing_Google_Maps | ||
+ | * https://maps.extension.wiki/wiki/Displaying_Google_maps | ||
+ | * https://github.com/JeroenDeDauw/Maps/blob/master/INSTALL.md#platform-compatibility-and-release-status | ||
+ | * http://edutechwiki.unige.ch/en/Maps_(MediaWiki_extension) | ||
+ | * https://maps.extension.wiki/wiki/Visual_Leaflet_editor | ||
+ | |||
+ | |||
+ | == Maps to be done == | ||
+ | |||
+ | * [[Hotel Carrefour]] | ||
+ | * [[Samy Express]] | ||
+ | * [[Montagne des Français]] | ||
+ | |||
+ | |||
+ | * [[Millot Plantation]] | ||
+ | |||
+ | * [[Sambirano]] |
Latest revision as of 09:48, 23 December 2020
Contents
Example map with a marker
<div style="max-width:600px;"> {{#display_map: -15.214232, 50.076107~[[Hotel Fitiavana]]~~; |type=satellite |service=google |width=auto |height=400 |zoom=18 |controls=pan, zoom, type, scale |copycoords=yes }} </div>
Example map with a line and markers
{{#display_map: -13.1918264553,49.0500772744~[[Noor Hotel]]~~; -12.8073644824,48.9577304944~Bobasakoa~~; | lines= -13.1918264553,49.0500772744: -12.8073644824,48.9577304944 |service=leaflet |height=500 |center=-12.9640116915,48.9870830812 |zoom=10 |enablefullscreen=yes }}
Note: More than one map a page will fail on mobile (Minerva) displays of the wiki.
lines
Lines between coordinates are used to make a path.
| lines= -13.1918264553,49.0500772744: -12.8073644824,48.9577304944
The default colour/thickness of line are red/1px.
The thickness, colour and opacity of the line can be redefined by the syntax:
| lines= -13.1918264553,49.0500772744: -12.8073644824,48.9577304944~Popup title~Popup text~green~0.42~10
Note: Thickness, colour and opacity only take effect when preceded by a popup title and text. The syntax is:
~Popup title~Popup text~Popup text~Line opacity~Line thickness
However, the popup when clicking the line only appears with google maps (not leaflet).
copycoords
Right-click on map to copy coordinates.
copycoords=yes
service
|service=leaflet
or
|service=google
icon
|icon=https://www.madacamp.com/images/madagascar/Green_marker.png
Or on a p/market basis:
-15.214232, 50.076107~Hotel Fitiavana~~https://www.madacamp.com/images/madagascar/Green_marker.png;
type
|type=satellite
the initial type of map (roadmap, satellite, hybrid, terrain)
label
|label=text
standard text to display in all popups without text
types
types=roadmap, satellite, hybrid, terrain
map options included in the control
If omitted, all options are included
minimum one option is required for constraint to take effect
controls
|controls=pan, zoom, type, scale
pan, zoom, type, scale, streetview, rotate
zoom
Zoom levels are between 1 and 20
|zoom=18
width
pixels or percentage
|width=auto
auto will stretch to the containing block
height
|height=400
centre (or center)
The location which should be the centre of the map
|centre=-14.254318, 50.157051
or
|center=-14.254318, 50.157051
If centre is omitted, center depends on the placemarks.
If zoom is omitted, zoom level will be set to fit the placemarks.
If there is only one placemark, zoom level has to be defined for the map to show.
searchmarkers
Add a filter search field for maps with many markers
enablefullscreen
|enablefullscreen=no |enablefullscreen=yes
If omitted, no fullscreen label is shown.
Fullscreen mode is not working well on desktop and ipad.
Fullscreen works better for leaflet maps but which do not have satellite mode
NOTE: Don't use this on maps service=google as it's broken.
Instead, enabled:
mapOptions.fullscreenControl = $.inArray('type', options.controls) != -1;
.. in jquery.googlemap.js for all Google maps to display the native Google full-screen toggle in the right corner.
resizable
Makes the map resizable with the mouse at the map edges on a regular PC
Note: Don't use this option as it causes a Javascript error that brakes the mobile display menu on Android on combination with Google's native fullscreen toggle.
image in placemark
* -14.273700, 50.176600~[[File:Chez_Orlance_003.jpg|left|70px|]]<br>Chez Orlance~~;
Documentation
- https://www.mediawiki.org/wiki/Topic:Ve0pru8m3ygl58vt - loading failure on Minerva
- https://maps.extension.wiki/wiki/Google_Maps_SMW_queries
- http://www.coastalwiki.org/wiki/Help:Semantic_maps
- https://www.mediawiki.org/wiki/Extension_talk:Maps
- https://maps.extension.wiki/wiki/Customizing_Google_Maps
- https://maps.extension.wiki/wiki/Displaying_Google_maps
- https://github.com/JeroenDeDauw/Maps/blob/master/INSTALL.md#platform-compatibility-and-release-status
- http://edutechwiki.unige.ch/en/Maps_(MediaWiki_extension)
- https://maps.extension.wiki/wiki/Visual_Leaflet_editor
Maps to be done