Domaines
Communes
Quartiers de Brest
Espaces de noms

Variantes
Actions
De Wiki-Brest

Modèle:Place : Différence entre versions

(Page créée avec « <!-- ##############Instructions on how the template works################## --><noinclude> {{Documentation}} Place [[Category:MapProject Te… »)
 
 
(54 révisions intermédiaires par 2 utilisateurs non affichées)
Ligne 1 : Ligne 1 :
<!-- ##############Instructions on how the template works##################
+
<!--######################### Affichage de la carte et du texte ##############################-->
--><noinclude>
+
<center>
{{Documentation}}
+
{| class="vcard" style="{{ #if:{{{width|}}} | width:{{{width}}}px; }}; background:#F0F0F0; border:{{{include|1px}}} #8888aa solid; margin-left: 10px; margin-right: 10px; padding:0.4em; {{ #if:{{{float|}}} | float:{{{float}}}; }}"
[[Category:WikiProject Templates|Place]]
 
[[Category:MapProject Templates|Place]]
 
</noinclude><!--
 
#########################The template itself##############################  
 
#####Please update any other language template if you alter this one######
 
###########-->
 
{| class="vcard" style="width:300px; background:#ddffdd; border:{{{include|1px}}} #B8D9C7 solid; margin-left: 10px; padding:0.4em; float:right;"
 
 
|-
 
|-
| style="border-bottom:1px solid #aaaaaa;padding-bottom:0.2em;" | [[Image:OpenStreetMap-Logo.svg|24x24px|logo]] <span class="fn org">'''{{{name}}}, {{#if: {{{subarea|}}} | {{{subarea}}},&#32;}}{{{area}}}'''</span>{{#if:{{{BestOfOSM|}}}|{{#switch:{{{BestOfOSM|}}}
+
| {{ #if:{{{title|}}} | <span class="fn org">'''{{{title}}}'''</span>}}
|BestOf=[[Image:Bestof.png|24x24px|right]][[Category:Best of OpenStreetMap]]
 
|Interesting=[[Image:Interesting.png|24x24px|right]][[Category:Best of OpenStreetMap/Interesting]]
 
|Import=[[Image:Import.png|24x24px|right]][[Category:Best of OpenStreetMap/Import]]
 
|Historic=[[Image:Historic.png|24x24px|right]][[Category:Best of OpenStreetMap/Historic]]
 
}}}}
 
 
|-
 
|-
| style="text-align:right;" | <span class="geo" style="color:grey;font-size:0.8em;">'''Latitude : '''<span class="latitude">{{{lat}}}</span>, '''Longitude : '''<span class="longitude">{{{long}}}</span></span>
+
| style="{{ #if:{{{title|}}} | border-top:1px solid #aaaaaa; padding-top:0.2em;}} text-align:right;" | <span class="geo" style="color:grey;font-size:0.8em;">'''Latitude : '''<span class="latitude">{{{lat}}}</span>, '''Longitude : '''<span class="longitude">{{{long}}}</span></span>
 
|-
 
|-
| '''[http://www.openstreetmap.org/index.html?lat={{{lat}}}&lon={{{long}}}&zoom={{{zoom|12}}} Browse {{{name}}} map]'''
+
| {{#tag:slippymap||lat={{{lat|48.391277}}}|lon={{{long|-4.484888}}}|z={{{zoom|10}}}|w={{{width|600}}}|h={{{height|600}}}|layer={{{layer|mapnik}}}|marker={{{marker|0}}}}}
 
|-
 
|-
| '''[http://www.openstreetmap.org/edit.html?lat={{{lat}}}&lon={{{long}}}&zoom={{{zoom|12}}} Edit map]'''
+
|{{ #if:{{{desc|}}} | {{{desc}}} }}
{{ #if: {{{image|}}} |
+
|}
{{!}}-
+
</center>
{{!}} align="center" {{!}} [[{{{image}}}|200px|Map of {{{name}}}]]
+
<!--######################### Géolocalisation de l'article ##############################-->
 +
<includeonly>
 +
{{#kml.placemark:Point({{{lat|48.391277}}},{{{long|-4.484888}}})
 +
| visibility = 1
 +
| open = 1
 +
| snippet = snippet
 
}}
 
}}
 +
</includeonly>
 +
 +
<!--######################### Documentation ##############################-->
 +
<noinclude>
 +
== Usage ==
 +
Le modèle s'appelle ainsi:
 +
  <nowiki>{{Place
 +
  | float        = right
 +
  | title        = Pays de Brest
 +
  | width        = 600
 +
  | height      = 600
 +
  | lat          = 48.093304
 +
  | long        = -1.675138
 +
  | zoom        = 15
 +
  | layer        = mapnik
 +
  | marker      = 1
 +
  | desc        = La carte '''OpenStreetMap''' du territoire
 +
  }}</nowiki>
 +
En plus d'afficher une carte OpenStreetMap dans votre article, ce modèle permet également d'ajouter l'article à la liste des articles géolocalisés du site. La finalité de cette liste d'articles est d'être réutilisée dans des applications de réalité augmenté utilisables directement depuis votre smartphone. Ce projet est actuellement en cours de développement.
 +
 +
Si vous souhaitez simplement géolocaliser votre article sans afficher de carte (le rendre visible depuis une application smartphone) préférez l'utilisation d'un des 2 modèles suivants:
 +
 +
* [[Modèle:GeoDMS|GeoDMS]] mes coordonnées géographiques sont au format degré minutes secondes
 +
* [[Modèle:GeoDEG|GeoDEG]] mes coordonnées géographiques sont au format degré décimaux
 +
 +
== Paramètres ==
 +
La liste des paramètres suivante peut-être utilisée avec ce modèle
 +
{| class="wikitable" width="95%"
 +
| width="10%" | '''Nom du paramètre'''
 +
| width="10%" | '''Nécessaire'''
 +
| width="80%" | '''Description'''
 +
|-
 +
| float
 +
| Non
 +
| Si non renseigné, la carte est affichée centrée sous le texte dans le corps de l'article<br/>
 +
Pour permettre un affichage à droite ou à gauche de votre texte, le paramètre peut prendre les valeurs:
 +
* right
 +
* left
 +
|-
 +
| title
 +
| Non
 +
| Affiche un titre pour la carte
 +
|-
 +
| width
 +
| Non
 +
| Si ce paramètre n'est pas utilisé la largeur de la carte sera de 400 pixels
 +
|-
 +
| height
 +
| Non
 +
| Si ce paramètre n'est pas utilisé la hauteur de la carte sera de 400 pixels
 +
|-
 +
| lat
 +
| Oui
 +
| La latitude du lieu exprimé en degré décimal
 
|-
 
|-
|  
+
| long
* [[:Category:Users in {{{name}}}|Users in {{{name}}}]]
+
| Oui
* [http://www.openstreetmap.org/traces/tag/{{urlencode:{{{name}}}}} GPS traces]
+
| La longitude du lieu exprimé en degré décimal
* Wallpaper image:  [http://tah.openstreetmap.org/MapOf/?lat={{{lat}}}&long={{{long}}}&z={{#expr:{{{zoom|12}}}+1}}&w=1280&h=1024&format=jpeg jpeg], [http://tah.openstreetmap.org/MapOf/?lat={{{lat}}}&long={{{long}}}&z={{#expr:{{{zoom|12}}}+1}}&w=1280&h=1024&format=png png]
 
* [http://www.informationfreeway.org/?lat={{{lat}}}&lon={{{long}}}&zoom={{{zoom|12}}}&layers=B0000T000F Maplint]
 
* [http://www.informationfreeway.org/?lat={{{lat}}}&lon={{{long}}}&zoom={{{zoom|12}}} informationfreeway]
 
{{#ifexpr: {{{zoom|12}}} > 11 |* Nearby: [http://gazetteer.openstreetmap.org/namefinder/?find={{urlencode:parking near {{{name}}}}} parking], [http://gazetteer.openstreetmap.org/namefinder/?find={{urlencode:pub near {{{name}}}}} pub]}}
 
* Check [http://toolserver.org/~kolossos/osm/osmhack.php?lat={{{lat}}}&lon={{{long}}}&name={{urlencode:{{{name}}}}} Map Features] <small> via [[Query-to-map]]</small>
 
* Check streets with [http://dev.openstreetmap.org/~random/no-names/?zoom={{{zoom|12}}}&lat={{{lat}}}&lon={{{long}}}&layers=0B000 no-names]
 
* [http://toolserver.org/~geohack/geohack.php?project=osm&pagename={{urlencode:{{{name}}}}}&language=en&params={{{lat}}}_N_{{{long}}}_E_type:city Geohack for OSM] with ''more maps''
 
 
|-
 
|-
| External links:{{#if: {{{list|}}} |
+
| zoom
* [{{{list}}} Mailing list] }}{{#if: {{{archive|}}} |
+
| Non
* [{{{archive}}} Mailing list archives] }}{{#if: {{{forum|}}} |
+
| La valeur du zoom effectué sur la carte
* [{{{forum}}} Forum] }}
 
* [http://tools.geofabrik.de/osmi/?lon={{{long}}}&lat={{{lat}}}&zoom={{{zoom|12}}} OSM Inspector]
 
* Osmaware: last [http://www.fxfoo.com/osm/kml/web/web-osm-world-day-latest-v0-openlayers.html?lat={{{lat}}}&lon={{{long}}}&zoom={{{zoom|12}}}&layers=B0T day], [http://www.fxfoo.com/osm/kml/web/web-osm-world-hour-latest-v0-openlayers.html?lat={{{lat}}}&lon={{{long}}}&zoom={{{zoom|12}}}&layers=B0T hour], [http://www.fxfoo.com/osm/kml/web/web-osm-world-minute-latest-v1-openlayers.html?lat={{{lat}}}&lon={{{long}}}&zoom={{{zoom|12}}}&layers=B0T min]
 
* [http://www.openstreetbrowser.org/?lon={{{long}}}&lat={{{lat}}}&zoom={{{zoom|12}}} OpenStreetBrowser]
 
* [http://openstreetbugs.schokokeks.org/?lon={{{long}}}&lat={{{lat}}}&z={{{zoom|12}}} OpenStreetBugs]
 
* {{Keepright | lat={{{lat}}} | long={{{long}}} | zoom={{{zoom|12}}} | db={{{krdb|EU}}} | text= Keep Right! }}
 
* [http://tile.openstreetmap.nl/coastlines.html?lon={{{long}}}&lat={{{lat}}}&zoom={{{zoom|12}}}&layers=B00T Coastline checker]
 
* [http://www.öpnvkarte.de/?lon={{{long}}}&lat={{{lat}}}&zoom={{{zoom|12}}} Public transport]
 
{{#if: {{{latlon|}}} |* [http://latlon.org/pt?lon={{{long}}}&lat={{{lat}}}&layers=B0T&zoom={{{zoom|12}}} Public transport] }}
 
* Wikipedia: {{#if: {{{de.wikipedia|}}} |[[Wikipedia:de:{{{de.wikipedia}}}|de]],}}{{#if: {{{en.wikipedia|}}} |[[Wikipedia:{{{en.wikipedia}}}|en]]|[[Wikipedia:{{{wikipedia|{{{name}}}}}}|en]]}}{{#if: {{{es.wikipedia|}}} |,[[Wikipedia:es:{{{es.wikipedia}}}|es]]}}{{#if: {{{fr.wikipedia|}}} |,[[Wikipedia:fr:{{{fr.wikipedia}}}|fr]]}}{{#if: {{{ru.wikipedia|}}} |,[[Wikipedia:ru:{{{ru.wikipedia}}}|ru]]}}
 
* [http://google.com/search?q={{urlencode:{{{name}}}}}+{{urlencode:{{{area}}}}} Google] (& [http://images.google.com/images?q={{urlencode:{{{name}}}}}+{{urlencode:{{{area}}}}} Image search])
 
* [http://www.webshots.com/search?query={{urlencode:{{{name}}}}}+{{urlencode:{{{area}}}}} Webshots]
 
* [http://www.geograph.org.uk/search.php?q={{urlencode:{{{name}}}}} Geograph]
 
 
|-
 
|-
| <span style="color:grey51;font-size:0.8em;">[[Creating city pages|Use this template for your city]] • [[Wiki Help#Places|What do the links do?]]</span>
+
| layer
 +
| Non
 +
| Le type de calque utilisé pour l'affichage du fond de carte<br/>Les valeurs possibles sont:
 +
* mapnik (par défaut si non renseigné)
 +
* osmarender
 
|-
 
|-
 +
| marker
 +
| Non
 +
| Permet d'afficher un marqueur si renseigné. Les valeurs possibles sont:
 +
* 0 (n'affiche pas de marqueur)
 +
* 1 (affiche un marqueur permettant de localiser le lieu indiqué par les paramètres lat et long
 +
|-
 +
| desc
 +
| Non
 +
| Permet d'afficher un texte descriptif sous la carte
 
|}
 
|}
<!-- main text of the template -->{{#if: {{{wikipedia|}}} |[[category:articles using places template and depreciated wikipedia parameter - for debugging]]}}
+
</noinclude>
'''{{{name}}}''' is a {{{type}}} in {{#if: {{{subarea|}}} | [[{{{subarea}}}]],&#32;}}[[{{{area}}}]] at latitude ''{{{lat}}}'', longitude ''{{{long}}}''.
 
{{ #if: {{{map|}}} |
 
{{{!}}align=center style="background-color:transparent;"
 
{{!}}-
 
{{!}}align="center" {{!}} {{#tag:slippymap||lat={{{lat}}}|lon={{{long}}}|z={{{zoom|12}}}|w={{{width|400}}}|h={{{height|400}}}|layer={{{layer|mapnik}}}}}
 
{{!}}-
 
{{!}}align="center" {{!}} <span style="font-size:0.8em;">OpenStreetMap images (and underlying map data) are freely available under the [[OpenStreetMap License]]</span><br>
 
{{!}}} <br> |
 
}}
 
 
 
<includeonly>
 
<!-- Allocate to categories. Note we want plural categories so use switch to change singular types (eg. city) to plurals (eg.cities) -->
 
  
<!-- If a category exists with the same name as the place then add the place to that category with a sort order of "*" to put it first rather than using "sortkey" -->
+
[[Catégorie:Modèle carte]]
{{#ifexist: Category:{{{name}}} | [[Category:{{{name}}}|*]] | }}
 
 
 
<!-- if subarea has been defined then add to category: types in subarea -->
 
{{#if: {{{subarea|}}} | [[Category: {{#switch: {{lc:{{{type}}} }}
 
| city = Cities
 
| ville = Cities
 
| continent = Continents
 
| country = Countries
 
| pays = Countries
 
| sovereign state = Countries
 
| county = Counties
 
| district = Districts
 
| kreis = Kreise
 
| landkreis = Landkreise
 
| département = Départements
 
| hameau = Hamlets
 
| hamlet = Hamlets
 
| island
 
| isle = Islands
 
| municipality = Municipalities
 
| province = Provinces
 
| oblast = Oblasts
 
| région = Regions
 
| region = Regions
 
| state = States
 
| suburb = Suburbs
 
| metropolitan borough and town
 
| town = Towns
 
| village = Villages
 
| Places }} {{#ifeq:{{{subarea}}}|Earth|on|in}} {{{subarea}}}|{{#if: {{{sortkey|}}} | {{{sortkey}}} | {{{name}}}}}]]
 
}}
 
 
 
<!-- Add the place to the category: types in area, but only do this if the category types in subarea does not exist -->
 
 
 
{{#ifexist:
 
Category: {{#switch: {{lc:{{{type}}} }}
 
| city = Cities
 
| ville = Cities
 
| continent = Continents
 
| country = Countries
 
| pays = Countries
 
| sovereign state = Countries
 
| county = Counties
 
| district = Districts
 
| kreis = Kreise
 
| landkreis = Landkreise
 
| département = Départements
 
| hameau = Hamlets
 
| hamlet = Hamlets
 
| island
 
| isle = Islands
 
| municipality = Municipalities
 
| province = Provinces
 
| oblast = Oblasts
 
| région = Regions
 
| region = Regions
 
| state = States
 
| suburb = Suburbs
 
| metropolitan borough and town
 
| town = Towns
 
| village = Villages
 
| Places }} {{#ifeq:{{{subarea}}}|Earth|on|in}} {{{subarea}}}
 
| <!-- Do nothing: subarea category exists --> |
 
[[Category: {{#switch: {{lc: {{{type}}} }}
 
| city = Cities
 
| ville = Cities
 
| continent = Continents
 
| country = Countries
 
| pays = Countries
 
| sovereign state = Countries
 
| county = Counties
 
| district = Districts
 
| kreis = Kreise
 
| landkreis = Landkreise
 
| département = Départements
 
| hameau = Hamlets
 
| hamlet = Hamlets
 
| island
 
| isle = Islands
 
| municipality = Municipalities
 
| province = Provinces
 
| oblast = Oblasts
 
| région = Regions
 
| region = Regions
 
| state = States
 
| suburb = Suburbs
 
| metropolitan borough and town
 
| town = Towns
 
| village = Villages
 
| Places }} {{#ifeq:{{{area}}}|Earth|on|in}} {{{area}}}|{{#if: {{{sortkey|}}} | {{{sortkey}}} | {{{name}}}}}]]
 
}}{{ #if: {{{image|}}} | [[Category:Place Uses Image]] | }}
 
</includeonly>
 
{{Template:Place
 
| lang        = en
 
| name        = Los Angeles
 
| type        = city
 
| subarea      = California
 
| area        = United States
 
| lat          = 34.05
 
| long        = -118.25
 
| zoom        = 11
 
| map          = yes
 
}}
 

Version actuelle datée du 9 mars 2012 à 13:20

Latitude : {{{lat}}}, Longitude : {{{long}}}
<slippymap lat="48.391277" lon="-4.484888" z="10" w="600" h="600" layer="mapnik" marker="0"></slippymap>


Usage

Le modèle s'appelle ainsi:

 {{Place
  | float        = right
  | title        = Pays de Brest
  | width        = 600
  | height       = 600
  | lat          = 48.093304
  | long         = -1.675138
  | zoom         = 15
  | layer        = mapnik
  | marker       = 1
  | desc         = La carte '''OpenStreetMap''' du territoire
  }}

En plus d'afficher une carte OpenStreetMap dans votre article, ce modèle permet également d'ajouter l'article à la liste des articles géolocalisés du site. La finalité de cette liste d'articles est d'être réutilisée dans des applications de réalité augmenté utilisables directement depuis votre smartphone. Ce projet est actuellement en cours de développement.

Si vous souhaitez simplement géolocaliser votre article sans afficher de carte (le rendre visible depuis une application smartphone) préférez l'utilisation d'un des 2 modèles suivants:

  • GeoDMS mes coordonnées géographiques sont au format degré minutes secondes
  • GeoDEG mes coordonnées géographiques sont au format degré décimaux

Paramètres

La liste des paramètres suivante peut-être utilisée avec ce modèle

Nom du paramètre Nécessaire Description
float Non Si non renseigné, la carte est affichée centrée sous le texte dans le corps de l'article

Pour permettre un affichage à droite ou à gauche de votre texte, le paramètre peut prendre les valeurs:

  • right
  • left
title Non Affiche un titre pour la carte
width Non Si ce paramètre n'est pas utilisé la largeur de la carte sera de 400 pixels
height Non Si ce paramètre n'est pas utilisé la hauteur de la carte sera de 400 pixels
lat Oui La latitude du lieu exprimé en degré décimal
long Oui La longitude du lieu exprimé en degré décimal
zoom Non La valeur du zoom effectué sur la carte
layer Non Le type de calque utilisé pour l'affichage du fond de carte
Les valeurs possibles sont:
  • mapnik (par défaut si non renseigné)
  • osmarender
marker Non Permet d'afficher un marqueur si renseigné. Les valeurs possibles sont:
  • 0 (n'affiche pas de marqueur)
  • 1 (affiche un marqueur permettant de localiser le lieu indiqué par les paramètres lat et long
desc Non Permet d'afficher un texte descriptif sous la carte
Outils personnels