« Geoloc » : différence entre les versions
De Wikimanche
mAucun résumé des modifications |
mAucun résumé des modifications |
||
Ligne 2 : | Ligne 2 : | ||
<div style="float:right; border:1px solid grey; margin-left:15px; margin-top:0px; margin-bottom:15px; margin-right:0px;"> | <div style="float:right; border:1px solid grey; margin-left:15px; margin-top:0px; margin-bottom:15px; margin-right:0px;"> | ||
{| | {| | ||
|[http://www.openstreetmap.org/index.html?mlat={{{latitude|}}}&mlon={{{longitude|}}}&zoom=12&layers=M {{#coordinates:{{{latitude|}}}, {{{longitude|}}}|format=dms|directional=yes}}] ''<small>(OSM)</small>'' | |[http://www.openstreetmap.org/index.html?mlat={{{latitude|}}}&mlon={{{longitude|}}}&zoom=12&layers=M {{#coordinates:{{{latitude|}}}, {{{longitude|}}}|format=dms|directional=yes}}] ''<small>(OSM)</small>'' | ||
|- | |- | ||
|align="center"| | | align="center" | | ||
{{#display_map:{{{latitude}}}, {{{longitude}}}~'''{{{titre|{{PAGENAME}}}}}''' | {{#display_map: {{{latitude}}}, {{{longitude}}}~'''{{{titre|{{PAGENAME}}}}}''' | ||
| center={{{latitude|}}},{{{longitude|}}} | | center={{{latitude|}}},{{{longitude|}}} | ||
| service=<!--rem-- leatflet --rem--> | | service=<!--rem-- leatflet --rem--> | ||
Ligne 21 : | Ligne 21 : | ||
<!-- | <!-- | ||
{{#if: {{{latitude|}}} {{{longitude|}}}|{{#kml.placemark:Point({{{latitude|0}}},{{{longitude|0}}})}} | {{#if: {{{latitude|}}} {{{longitude|}}}|{{#kml.placemark:Point({{{latitude|0}}},{{{longitude|0}}})}} | ||
-- | --> | ||
[[Catégorie:Article géolocalisé sur une carte]] | [[Catégorie:Article géolocalisé sur une carte]] | ||
Ligne 29 : | Ligne 29 : | ||
--> | --> | ||
<small>'''''{{#if: {{{localisation|}}}|{{{localisation}}}|{{PAGENAME}}}}'''''</small> | <small>'''''{{#if: {{{localisation|}}}|{{{localisation}}}|{{PAGENAME}}}}'''''</small> | ||
|}</includeonly> | |}</div></includeonly> | ||
<noinclude><br clear="all" /> | <noinclude><br clear="all" /> |
Version du 18 décembre 2016 à 17:17
- Syntaxe
Pour insérer dans une page ce modèle, il suffit de copier coller le code ci-dessous, en complétant les champs (javascript doit être activé) :
{{Geoloc |largeur = <!-- largeur en pixels : obligatoire --> |hauteur = <!-- hauteur en pixels : obligatoire --> |latitude = <!-- la latitude du point sur la carte : obligatoire en décimal avec "." ex : 49.12345 --> |longitude = <!-- la longitude du point sur la carte : obligatoire en décimal avec "." ex : -1.12345 --> |localisation = <!-- légende de la localisation : par défaut = Nom de la Page --> |zoom = <!-- le niveau de zoom : par défaut 12 ; le plus éloigné = 0 ; le plus proche = 21 --> }}
Exemple
49° 6' 0.00" N, 1° 21' 0.00" W (OSM) |
Centre de la Manche |
{{Geoloc |largeur = 260 |hauteur = 380 |latitude = 49.1 |longitude = -1.35 |localisation = Centre de la [[Manche]] |zoom = 8 }}