Plantilla:OSM Location map

Icona de documentació de mòdul Documentació de la plantilla [ mostra ] [ modifica el codi ] [ mostra l'historial ] [ refresca ]
Old John Tower a Bradgate Park, Leicestershire

Aquesta plantilla proporciona un mapa en un marc, per a qualsevol ubicació i escala. De la manera més senzilla, només pot mostrar la imatge d'OpenStreetMap i un indicador d'escala per a una àrea determinada de la Terra. Opcionalment, hi ha disponibles una sèrie d'eines de marcadors, etiquetes i anotacions per incloure marcadors d'ubicació, etiquetes, punts numerats, un encapçalament, subtítols, mapa de minilocalitzador i superposicions. El mapa també ofereix un enllaç a una versió de "pantalla completa interactiva".

Propòsit modifica

L'OSM Location map permet a un editor incloure un mapa en un marc per a qualsevol part del món, a qualsevol escala des de tot el món fins a un o dos carrers. Fa ús de les dades de mapes d'OpenStreetMap i permet que una pàgina o tema basat en un lloc mostri simplement l'àrea que es descriu, sense necessitat de plantilles de mapes predeterminades o gràfics externs. El mapa subjacent s'actualitzarà i millorarà automàticament a mesura que es desenvolupin les dades de l'OSM. Es pot seleccionar un nivell de zoom adequat al tema i es proporciona un marcador d'escala a la cantonada inferior dreta. Això només ofereix una guia aproximada de les distàncies al mapa, ja que la projecció del mapa provoca canvis d'escala en funció de la latitud. S'ha tingut en compte això, però només en grans trossos de 20 graus.

També es pot fer que el mapa mostri múltiples marques, imatges i etiquetes (actualment limitat a 60). El mapa emmarcat resultant també té un enllaç a una versió interactiva a pantalla completa, que mostra la mateixa ubicació "a la part superior" de la pàgina actual. No pot mostrar cap text ni altres imatges, de manera que es limita a les marques de punter. Tanmateix, en altres aspectes, té una interfície de mapa més rica, l'usuari pot canviar l'escala i la panoràmica, es poden assignar imatges en miniatura emergents i subtítols als punts marcadors, i també proporciona enllaços addicionals per accedir a una àmplia gamma de mapes, satèl·lit imatges, etc. (L'opció de pantalla completa utilitza la disposició de mapeig <maplink>).

El mapa d'ubicació de l'OSM és un embolcall a sobre d'una altra plantilla anomenada {{Graph:Street map with marks}}. Quan s'utilitzen conjunts de dades molt grans, pot ser millor utilitzar directament la plantilla Graph, ja que permet un nombre il·limitat de marques i etiquetes. Tanmateix, requereix un marcatge de codificació diferent (GeoJSON) i no s'adapta bé a la codificació manual. És especialment adequat per utilitzar conjunts de dades extrets directament mitjançant cerques automàtiques de Wikidata.

Comparació amb {{Maplink}} modifica

From May 2018 it has also been possible to create a map in a frame via {{Maplink}}, which in some respects does a similar job to OSM Location map. In both cases a static map image can be added to an article, for anywhere in the world, pulling in the map from OpenStreetMap data. The differences are in what they can and can't add to the base map. Maplink, in both its framed and fullscreen versions, can only add either points (numbered or icon-style pointy dots), or various lines and areas can be imported from OpenStreetMap via wikidata Q values (at present limited to boundaries, and roads). Thus the framed map and fullscreen version will show identical information. The OSM Location map on the other hand, cannot add the Q value lines and areas except to the interactive fullscreen click-through. On the other hand it can use the framed map to show a much richer selection of dots, shapes, overlays, images and especially text to convey specific details relevant to a particular article.

Ús modifica

Versió mínima
un mapa sense cap element afegit centrat en coordenades de latitud i longitud, mitjançant un valor {{coord}}. Estableix el zoom per donar una escala que s'ajusti al tema (0 = món sencer, 18 = un carrer). Amb només aquestes opcions configurades, tots els altres paràmetres utilitzen els valors predeterminats o es deixen sense utilitzar. També ofereix un enllaç a la versió interactiva de pantalla completa.
{{OSM Location map           <!--Només hi ha dos paràmetres essencials: -->
| coord = {{Coord|53.4146|-4.3341}}  <!-- coordenades de latitud i longitud per al centre del mapa -->
|  zoom = 15                         <!--zoom 0=tot el món, 18=un carrer.-->
}}

Marcador únic modifica

Utilitzant la configuració principal per defecte, es pot afegir al mapa amb un marcador "Red pog" i una etiqueta vermella fosca. L'exemple següent també afegeix alguns elements addicionals (els tres darrers paràmetres) que s'utilitzen a la versió de pantalla completa interactiva.

El 'Llanfechell Triangle', els menhirs es troben al nord-oest de Llanfechell.
{{OSM Location map
|   coord = {{Coord|53.394|-4.450}}
|    zoom = 13
|   width = 300
|  height = 150
| caption = El 'Llanfechell Triangle', els menhirs es troben al nord-oest de [[Llanfechell]].

|      label = Llanfechell Triangle
| mark-coord = {{Coord|53.3966|-4.46204}}
|  label-pos = right
| mark-title = Llanfechell Triangle
| mark-image = The Llanfechell Triangle - geograph.org.uk - 1260817.jpg
| mark-description=Grup de tres menhirs que es creu que data de l'edat del bronze, a [[Llanfechell]], [[Anglesey]]
}}


Codi en blanc
Codi en blanc per a un mapa de marcador únic Codi en blanc amb comentaris
{{OSM Location map
|   coord = {{Coord| | }} 
|    zoom = 
|   width = 
|  height = 
| caption =  
|      label = 
| mark-coord = {{Coord| | }}
|  label-pos = 
| mark-title = 
| mark-image = 
| mark-description = 
}}
{{OSM Location map
|   coord = {{Coord|   |   }} <!-- {{Coord}} té diversos formats per a latitud i longitud -->
|    zoom =          <!-- (1=tot el món, 18=un carrer)--> 
|   width =          <!-- mplada i alçada del marc. Entrada numèrica com a píxels. No afegiu px -->
|  height = 
| caption =          <!-- Text a sota del mapa. Pot incloure [[hipervincle]] -->
<!-- Paràmetres per a la 1ª marca -->
|      label =       <!-- text al costat de la marca -->
| mark-coord =       <!-- utilitzeu {{Coord| | }} per establir la ubicació de latitud i longitud per la marca -->
|  label-pos = <!--la posició per defecte es deixa. També pot ser a la dreta, a dalt, a baix. --> -->
|  label-pos =       <!--la posició per defecte es left. També pot ser right, top, bottom. -->
| mark-title =       <!-- | -->
| mark-image =       <!-- | aquests només s'utilitzen a la pàgina enllaçada a pantalla completa -->
| mark-description = <!-- | -->
}}


Múltiples marques, etiquetes i imatges modifica

A més del conjunt de paràmetres de marca no numerada, n'hi ha 60 de numèrics. D'altra banda, són idèntics als anteriors, però el nom acaba en un número (1-60). Cada marca i etiqueta té el seu propi conjunt de paràmetres (|mark1=, |mark-coord1=, |label1=, |label-pos1= etc... |mark2=, |mark-coord2=, |label2=, |label-pos2=, etc.) Els valors es poden heretar del conjunt de paràmetres "mark1 master", o d'un conjunt especial per defecte 'markD' que proporciona valors predeterminats de substitució. Quan s'estableixen, aquests valors són heretats pels altres conjunts numerats per evitar haver de repetir-los per a cadascun, mentre que encara es poden establir individualment quan sigui necessari.

Múltiples marques modifica

Exemple de títol
Monuments al voltant de Llanfechell, Anglesey
Exemple de codi per al mapa de dos marcadors que es mostra a la dreta:
{{OSM Location map
|   coord = {{Coord|53.395|-4.452}}
|    zoom = 14
|   float = right
|   width = 300
|  height = 250
| caption = Monuments al voltant de [[Llanfechell]], [[Anglesey]]
|   title = Exemple de títol

|    minimap = file bottom right <!-- Afegeix una "imatge d'un minimapa" a la cantonada designada -->
|  mini-file = Wales relief location map.jpg
| mini-width = 70 <!-- Totes les unitats de la miniimatge són unitats en píxels -->
|mini-height = 90 <!-- l'alçada i l'amplada han de coincidir amb les dimensions del fitxer d'imatge -->
|  minipog-gx = 36 <!-- Les coordenades x i y són el nombre de píxels des d'un origen superior esquerre -->
|  minipog-gy = 3  <!-- Opcionalment es col·loca un punt vermell per mostrar la ubicació del mapa principal -->

|      label1 = Baron Hill Maen Hir <!-- primers detalls de la marca -->
| mark-coord1 = {{Coord|53.3964|-4.4531}}
|       mark1 = Red pog.svg <!-- Red pog és el valor predeterminat, així que no és necessari -->
|  label-pos1 = right       <!-- Diversos paràmetres de mark1 són heretats per les altres marques -->
| label-size1 = 11          <!-- tret que es substitueixin individualment -->
| label-color1 = hard grey  <!-- es poden utilitzar alguns colors estàndard que combinen bé amb el mapa -->
|  mark-title1 = Baron Hill Maen Hir
|  mark-image1 = Standing stone east of Llanfechell - geograph.org.uk - 1254434.jpg
|mark-description1=Baron Hill Maen Hir, és un menhir al nord de[[Llanfechell]].

|      label2 = Llanfechell Triangle <!-- detalls de la segona marca -->
| mark-coord2 = {{Coord|53.3966|-4.46204}}
|  label-pos2 = top
| label-offset-x2 = 35      <!-- Label offsets mouen l'etiqueta (en unitats de píxels) -->
| label-offset-y2 =         <!-- sense afectar la posició de la marca. +ve = right and down -->
| mark-title2 = Llanfechell Triangle
| mark-image2 = The Llanfechell Triangle - geograph.org.uk - 1260817.jpg
|mark-description2=Grup de tres menhirs que es creu que dates de l'edat del bronze, a [[Llanfechell]], [[Anglesey]]
}}

Valors heretats modifica

Per minimitzar la repetició del codi, hi ha una escala lliscant d'herència que s'aplica a cada valor de cada conjunt de paràmetres. Per exemple, si s'estableix label-size4=16, això sempre tindrà prioritat. Si label-size4 no s'ha establert, heretarà el valor de la configuració especial Default (predeterminada, definida mitjançant label-sizeD= ). Si no s'ha establert cap valor per defecte, heretarà el valor establert pel "conjunt de paràmetres mestre", label-size1=. Si això tampoc no està definit, tornarà al valor predeterminat subjacent, que en el cas de la mida de l'etiqueta és 12. El mateix passa amb totes les variables relacionades amb marques i etiquetes, (tot i que no amb les coordenades, les etiquetes o títols de marques, que sempre són únics per a la marca concreta amb què es relacionen.)

Afegint un minimapa a la cantonada esquerra o dreta modifica

Moltes pàgines amb caixes d'informació (infotaules) ja inclouen un mapa de localització per donar als lectors una idea adequada d'on es troba el tema o el lloc dins d'una àrea més àmplia. Per a aquells que no ho fan, pot ser útil incloure-ne un al mapa. El mòdul "Graph" subordinat que utilitza el mapa d'ubicació de l'OSM ofereix una opció de mapa del món integrada, que actuarà com a minimapa de localització i afegeix automàticament un punt de localització vermell (minimap = on). Malauradament, és massa general per a la majoria dels propòsits, de manera que una opció alternativa, però menys automatitzada, és fer ús d'un fitxer de "Mapa d'ubicació" existent. Això es pot veure a l'exemple del mapa de Llanfechell.

L'amplada i l'alçada del mapa s'han de decidir, especificar (i calcular per no distorsionar les dimensions del mapa). És possible que alguns mapes ja destaquin la característica, però si no, es pot col·locar un localitzador opcional 'pog' calculant i especificant els valors minipog-gx i -gy, utilitzant una quadrícula de 100x100 al minimapa. (per tant, els valors gx i gy de 25 i 50 col·locarien un punt a una quarta part i a la meitat del minimapa. No recull ni utilitza valors de latitud i longitud. L'origen (0,0) és a la part superior a l'esquerra del minimapa i el mapa en si mateix es mostra per defecte a la cantonada inferior dreta, però també pot utilitzar minimap=file bottom left, minimap=file top left i minimap=file top right.

| minimap = file bottom right
| mini-file = Wales relief location map.jpg
| mini-width = 70
| mini-height = 90
| minipog-gx = 36
| minipog-gy = 5

El punt romandrà al lloc correcte encara que després trieu una mida diferent per al minimapa. (Tingueu en compte que els ara redundants minipog-x i minipog-y es conserven per compatibilitat. Aquests utilitzaven les mateixes dimensions de píxels que l'amplada i l'alçada del mapa, cosa que els feia més difícils de calcular/endevinar i calia tornar-los a fer si s'havia canviat la mida. Molt millor utilitzar gx i gy a partir d'aquí.

Si l'àrea del mapa real és una gran part del minimapa, es pot incloure un rectangle vermell buit en lloc d'un punt, per mostrar els límits del mapa principal. Per utilitzar aquesta funció, només cal que especifiqueu l'amplada del rectangle requerit: minimap-boxwidth=xx on xx = el percentatge de l'amplada del minimapa del quadre. En general, qualsevol cosa molt per sota de xx=15 quedarà millor representada per un punt. Per establie L'amplada requerida caldrà que en feu algunes proves. Aleshores, l'alçada del rectangle es correspon en proporció al mapa real i s'escalarà si la mida del minimapa canvia.

Text en un arc modifica

El text per a característiques geogràfiques àmplies es pot col·locar al voltant d'un arc, per transmetre la sensació d'una àrea més àmplia o per seguir la corba d'un riu, serralada, costa, etc. Això funciona completament independent de les altres etiquetes. No s'adjunta a cap marca o punt, i no crea cap marcador a pantalla completa. Requereix coordenades per a la primera lletra, paràmetres per a l'angle inicial, radi de l'arc i espai entre lletres. La mida i el color del text també es poden especificar o heretar de la configuració predeterminada.

Codi d'inici en blanc per a text en arcs, amb exemples d'inici per a diferents patrons d'arc.
|       arc-coordA = {{Coord|xxx|yyyy}}   <!-- coordenades de la primera lletra -->
|      arc-textA = <!-- Afegiu el vostre text aquí -->
| arc-text-sizeA = <!-- mida de lletra. Si no està definida, per defecte és 12 -->
|arc-text-colorA = <!-- estableix el color del text. S'accepten els colors pel mapa de l'OSM en hexadecimal #000000 i els colors estandarditzats
|     arc-angleA = <!-- en graus, de -180 a 180. 0 començarà com a horitzontal, -90 recte cap amunt, 90 recte cap avall -->
|       arc-gapA = <!-- 1= una notació 'estàndard'. 0.2 és força ajustat, 10 és molt ample --> 
|                  <!-- un ''gap'' negatiu invertirà les lletres i anirà a l'inrevés al voltant de l'arc -->
|    arc-radiusA = <!-- 1= una notació 'estàndard', 0.5 força ajustat a l'arc, 8 és tan ample que és gairebé pla -->
|ellipse-factorA = <!-- 1.0 és conceptualment circular, de 0.5 to 1.0 aplanarà la part superior i inferior, per sobre d'1.0 aplana els costats -->
Details about using artc-text, with starter-examples for different arc-patterns.
La naturalesa del sistema de coordenades terrestre significa que hi haurà alguna variació en un arc a diferents latituds i a diferents nivells de zoom. El programa fa correccions per això, però encara hi haurà variacions residuals. De la mateixa manera, els canvis de radi també tindran algun efecte sobre la mida de l'espai, amb un radi més gran que obrirà una mica l'espai. Per tant, caldrà fer proves i correccions considerables per obtenir la forma i l'efecte desitjats. Com a regla general, identifiqueu les coordenades del punt inicial requerit, trieu un patró inicial de la selecció següent i, a continuació, ajusteu els paràmetres perquè s'ajustin als requisits del mapa.
Petit somriure:
|     arc-coordA = {{Coord| | }}
|      arc-textA =  
| arc-text-sizeA = <!-- per defecte és 12 -->
|arc-text-colorA = <!-- per defecte és vermell fosc -->
|     arc-angleA = -170
|       arc-gapA = -1.2
|    arc-radiusA = 1.6
Gran somriure:
|     arc-coordA = {{Coord| | }}
|      arc-textA =  
| arc-text-sizeA = <!-- per defecte és 12 -->
|arc-text-colorA = <!-- per defecte és vermell fosc -->
|     arc-angleA = -150
|       arc-gapA = -3
|    arc-radiusA = 0.7
Cella ampla:
|     arc-coordA = {{Coord| | }}
|      arc-textA =  
| arc-text-sizeA = <!-- per defecte és 12 -->
|arc-text-colorA = <!-- per defecte és vermell fosc -->
|     arc-angleA = -20
|       arc-gapA = 2
|    arc-radiusA = 0.8
Parèntesi inicial (llegint amunt):
|     arc-coordA = {{Coord| | }}
|      arc-textA =  
| arc-text-sizeA = <!-- per defecte és 12 -->
|arc-text-colorA = <!-- per defecte és vermell fosc -->
|     arc-angleA = -110
|       arc-gapA = 1.2
|    arc-radiusA = 0.6
Parèntesi inicial (llegint avall):
|     arc-coordA = {{Coord| | }}
|      arc-textA =  
| arc-text-sizeA = <!-- per defecte és 12 -->
|arc-text-colorA = <!-- per defecte és vermell fosc -->
|     arc-angleA = -60
|       arc-gapA = -2
|    arc-radiusA = 0.5
Parèntesi final (llegint amunt):
|     arc-coordA = {{Coord| | }}
|      arc-textA =  
| arc-text-sizeA = <!-- per defecte és 12 -->
|arc-text-colorA = <!-- per defecte és vermell fosc -->
|     arc-angleA = 120
|       arc-gapA = -1.5
|    arc-radiusA = 0.8
Parèntesi final (llegint avall):
|     arc-coordA = {{Coord| | }}
|      arc-textA =  
| arc-text-sizeA = <!-- per defecte és 12 -->
|arc-text-colorA = <!-- per defecte és vermell fosc -->
|     arc-angleA = 60
|       arc-gapA = 2.5
|    arc-radiusA = 0.4

Marques alternatives modifica

Pentre Ifan i altres jaciments neolítics propers
Exemple de mapa amb marques alternatives i text: Pentre Ifan
{{OSM Location map
| coord ={{Coord|52.0|-4.830}}| zoom =11| width = 320 | height = 350
| caption = [[:en:Pentre Ifan|Pentre Ifan]] i altres jaciments neolítics propers
| scalemark = 7

| minimap = file bottom left
| mini-file = Pembrokeshire UK relief location map.jpg
| mini-width = 110
| mini-height = 82
| minipog-gx = 69
| minipog-gy = 25
| minimap-boxwidth=20

|       markD = Archaeological site icon (red).svg
|  mark-sizeD = 9
| label-sizeD = 10
|label-colorD = hard grey

|      label = Pentre Ifan
| mark-coord = {{Coord|51.9990|-4.7700}}
|  mark-size = 14
| label-size = 15
|label-color = dark grey
|  label-pos = left
| mark-title = Pentre Ifan, [[:en:List of Scheduled prehistoric Monuments in north Pembrokeshire|Pembrokeshire]]
| mark-image = DMPentreIfanFront.JPG 
| mark-description = El més gran i millor conservat [[dolmen]] del [[:en:Neolithic British Isles|neolític]] a [[Gales]]

|      label1 = Llech-y-Tribedd dolmen
| mark-coord1 = {{Coord|52.0545|-4.7717}}
| mark-title1 = Llech-y-Tribedd, [[:en:List of Scheduled prehistoric Monuments in north Pembrokeshire|Pembrokeshire]] 
| mark-image1 = Llech-y-tribedd and Carn Ingli - geograph.org.uk - 1426923.jpg
| mark-description1 = Llech-y-Tribedd és un dolmen ben conservat amb tres muntants afilats i una massissa pedra a sobre.

|      label2 = Carreg Coetan 
|     labela2 = Arthur dolmen
| mark-coord2={{Coord|52.0186|-4.8282}}
|  label-pos2 = top
| label-offset-x2 = -6
| label-offset-y2 = -2
| mark-title2 = Carreg Coetan Arthur, [[:en:List of Scheduled prehistoric Monuments in north Pembrokeshire|Pembrokeshire]] 
| mark-image2 = Carreg Coetan burial chamber. - geograph.org.uk - 1044642.jpg
| mark-description2 = [[:en:Carreg Coetan Arthur|Carreg Coetan Arthur]] és un dolmen en un petit recinte tancat als afores de Newport

|      label3 = Banc Du 
|     labela3 = Neolithic enclosure
| mark-coord3={{Coord|51.9409|-4.823}}
|  label-pos3 = top
| mark-title3 = Banc Du Neolithic enclosure, [[:en:List of Scheduled prehistoric Monuments in north Pembrokeshire|Pembrokeshire]] 
| mark-image3 = Sheep on Banc Du - geograph.org.uk - 1754023.jpg
| mark-description3 = [[:en:Banc Du|Banc Du]] és un turó prominent amb el primer recinte neolític confirmat a Gal·les

|      label4 = Bedd yr Afanc 
|     labela4 = Burial Chamber
| mark-coord4={{Coord|51.9775|-4.7563}}
|  label-pos4 = top
| mark-title4 = Bedd yr Afanc Burial Chamber, [[:en:List of Scheduled prehistoric Monuments in north Pembrokeshire|Pembrokeshire]] 
| mark-image4 = Bedd yr afanc, looking east-southeast - geograph.org.uk - 404497.jpg
| mark-description4 = Bedd yr Afanc és una cambra funerària de pedra sota el cim de Mynydd Preseli

|      label5 = Standing Stones
| mark-coord5={{Coord|51.9685|-4.7945}}
|  label-pos5=right
| mark-title5 = Standing Stones, [[:en:List of Scheduled prehistoric Monuments in north Pembrokeshire|Pembrokeshire]] 
| mark-image5 = 
| mark-description5 = Tafarn-y-Bwlch i Waun Mawn Standing Stones

|      label6 = Trellyffaint dolmen
| mark-coord6={{Coord|52.0478|-4.7982}}
|  label-pos6=right
| mark-title6 = Trellyffaint burial chamber, [[:en:List of Scheduled prehistoric Monuments in north Pembrokeshire|Pembrokeshire]] 
| mark-image6 = Trellyffant burial chamber, looking northeast - geograph.org.uk - 1410564.jpg
| mark-description6 = Trellyffaint dolmen, mirant al nord-est. La capçalera s'ha ensorrat en algun moment.

|      label7 = Cerig-y-Gof 
|     labela7 = chambered tomb
| mark-coord7={{Coord|52.0137|-4.8627}}
|  label-pos7=bottom
| label-offset-x7=10
| mark-title7 = Cerig-y-Gof chambered tomb, [[:en:List of Scheduled prehistoric Monuments in north Pembrokeshire|Pembrokeshire]] 
| mark-image7 = Cerrig y Gof chambered tomb - geograph.org.uk - 202375.jpg
| mark-description7 = Un grup de cinc cambres revestides de pedra, que es creu que originàriament estaven cobertes per un sol túmul.

|      label8 = Bedd Arthur stone circle
| mark-coord8={{Coord|51.9597|-4.7223}}
| mark-title8 = Bedd Arthur, [[:en:List of Scheduled prehistoric Monuments in north Pembrokeshire|Pembrokeshire]] 
| mark-image8 = Beddarthur standing stone circle, Preseli Mountains - geograph.org.uk - 258436.jpg
| mark-description8 = [[:en:Bedd Arthur|Bedd Arthur]] és un recinte de banc oval encastat amb pedres.

| arc-coordA = {{Coord|52.045|-4.910}}
| arc-angleA=-190
| arc-gapA=-2
| arc-radiusA=0.8
| arc-text-colorA=soft blue
| arc-textA=Cardigan Bay

| arc-coordB = {{Coord|51.998|-4.88}}
| arc-angleB=-110
| arc-gapB=-4.1
| arc-radiusB=0.76
| arc-text-colorB=soft green
| arc-textB=PRESELI HILLS
}}

En lloc d'utilitzar el "pog vermell" estàndard per marcar punts al mapa, es poden utilitzar altres imatges. Es pot especificar qualsevol imatge de Wikimedia Commons. L'exemple anterior de Pentre Ifan utilitza 'Archaeological site icon (red).svg'. Si s'especifica un fitxer d'imatge en particular a mark1=, totes les marques posteriors també l'utilitzaran tret que assignin el seu propi fitxer d'imatge. Si la imatge no és quadrada, també s'ha d'establir un valor de dimensió (proporció d'amplada per a una alçada d'1)

Superposició transparent modifica

Castell de Leicester i la línia de les muralles medievals de la ciutat
Exemple de mapa amb superposició transparent: Castell de Leicester
{{OSM Location map
| lat =52.6328
| lon =-1.138
| zoom =14
| width = 300       <!-- amplada i alçada del marc. entrada numèrica: no afegiu px -->
| height = 300
| caption = Castell de Leicester i la línia de les muralles medievals de la ciutat
| minimap = file
| mini-file=Leicestershire UK district map (blank).svg
| mini-width=100
| mini-height=75
| minipog-gx=52
| minipog-gy=55
| scalemark =106     <!-- desplaça la marca d'escala més cap a l'esquerra -->

| mark = Leicester Town Walls map overlay.svg
| mark-coord = {{Coord|52.6328 |-1.1380}}   <!-- latitud i longitud per a la superposició -->
| mark-size = 300       <!--alçada de la imatge de superposició, en un traçat coincideix amb el marc-->
| mark-dim = 0.8        <!--dimensió (factor d'escala) per definir l'amplada, necessària si la imatge no és quadrada-->
| mark-title=none       <!--cap marcador a la pantalla completa enllaçada-->

| mark-coord1 = {{Coord|52.632333|-1.141194}} <!-- latitud i longitud per a la marca -->
| mark1=Red pog.svg
| mark-size1=11
| label1 = Leicester 
| labela1 = Castle
| label-pos1=left
| mark-title1 = Leicester Castle
| mark-image1 = The Great Hall Leicester Castle.jpg  <!-- per utilitzar-lo a la pàgina enllaçada en pantalla completa -->
| mark-description1 = El Great Hall, ara amb una façana de la reina Anna, són les principals restes del castell medieval de Leicester.

| mark-coord2 = {{Coord|52.630|-1.1458}} <!-- latitud i longitud per a la marca -->
| mark-size2=0
| label2 = River Soar| label-size2=9
| label-pos2=top| label-angle2=-55
| label-color2=soft blue| mark-title2 = none
}}

La imatge d'una marca no ha de ser petita i opaca. Es pot utilitzar una imatge de superposició més gran (amb un fons transparent) per mostrar característiques particulars no incloses al mapa base, com ara les antigues muralles d'una ciutat (vegeu el mapa adjacent). Aquestes imatges es poden crear de diverses maneres (com ara traçant una còpia del mapa base); s'invoquen com qualsevol altre fitxer d'imatge de marca. (Per obtenir una guia detallada per crear i desplegar una superposició per a aquests mapes, vegeu en:User:J. Johnson/OSM overlay how-to).

Color del text modifica

El color del text de l'etiqueta es pot especificar mitjançant label-color = . Els colors html estàndard es poden especificar pel nom i qualsevol color es pot especificar mitjançant la codificació dels triplets hexadecimals #xxyyzz (vegeu colors web). Tanmateix, per crear una aparença coherent als mapes de la Viquipèdia, hi ha alguns colors específics del mapa d'ubicació OSM, amb una gamma de tons que s'ajusten bé a l'esquema de colors dels mapes base. En general, el millor és fer ús d'aquesta gamma, tret que hi hagi bones raons per utilitzar altres tons particulars per a funcions específiques. Amb un ús normal, s'ha de seguir el següent esquema de colors de l'etiqueta:

soft grey (gris suau) Assentaments = soft grey (el tema del mapa pot ser de color dark grey i una etiqueta més gran)

És possible que les zones del mapa amb fons més foscos o més ocupats necessitin una ombra més fosca hard grey i dark gray, respectivament.

soft blue (blau suau) Rius, llacs, zones marines, etc. = soft blue (funciona bé a sobre de les zones blaves d'OSM)
soft green (verd suau) Parcs, parcs nacionals/regionals, jardins, boscos, etc. = soft green funciona bé a la part superior de les zones verdes d'OSM. (hard green pot ser desitjable als boscos o per al tema del mapa)
hard red (vermell fosc) Utilitzeu-lo amb cura = dark red combina bé amb un pog vermell, però pot semblar un enllaç vermell. Per desgràcia, encara no hi ha enllaços possibles al mapa.)
dark grey (gris fosc) Llocs individuals = dark grey (no cal especificar si el lloc té una sola etiqueta per acompanyar un pog vermell)


Taula completa d'opcions de colors modifica

Colors recomanats per als mapes d'OSM.

Aquests tenen un to més pastel que els colors estàndard, així que combinen eficaçment amb els fons del mapa

soft red #DB3123 hard red #AA1205 dark red #7A0101
soft green #81AF81 hard green #538253 dark green #165916
soft blue #77A1CB hard blue #5581A9 dark blue #105396
soft grey #AAAA88 hard grey #777755 dark grey #333322
soft brown #CCB56C hard brown #AD7F14 dark brown #8E5913

Efectes de text modifica

etiqueta de diverses línies
Quan el text de l'etiqueta és massa llarg per cabre en una sola línia, amb label = , es poden utilitzar dues línies d'etiqueta més: labela = i labelb = .
Etiqueta sense marca
Si mark-size=0, això té l'efecte d'una etiqueta flotant lliure i sense marca
Etiqueta en angle
És possible especificar un label-angle = , que farà girar el text de l'etiqueta al voltant del centre de la marca en un angle especificat. L'ús d'una etiqueta en angle que tampoc no tingui marca és especialment bo per etiquetar diverses característiques geogràfiques i lineals. Una alternativa particular és establir el text en un arc, utilitzant les opcions d'{{OSM Location map/ArcText}}, il·lustrades pel text 'Preseli Hills' al mapa del mapa de Pentre Ifan. Per coherència estilística, els noms d'assentaments i edificis normalment no s'han de mostrar un angle.

Punts numerats modifica

Edificis catalogats a Stoneygate
1
St John The Baptist Church
2
Congregational Church
3
Eastfield, Stanley Road
4
Stoneygate School
5
The Firs
6
White House

Si es necessiten punts numerats, en lloc de (o també) etiquetes de text, això es pot aconseguir mitjançant les formes integrades. Per exemple, shape1=n-circle col·locarà un punt numerat en aquesta posició de coordenades (o l-cercle per a les lletres). En general, és molt millor utilitzar els punts en seqüència, de manera que cada marca numerada dóna un punt numerat, i coincidiran amb els de pantalla completa. Si auto-caption=1, el subtítol generarà una llista numerada utilitzant les entrades mark-title. Per exemple:-

{{OSM Location map
| coord={{Coord|52.620|-1.112}}
| float=left| zoom =15
| width = 200  | height = 300
| mark-coord1 = {{Coord|52.6180|-1.11189}}
| mark-title1 = St John The Baptist Church
| shape1=n-circle
| shape-color1=dark blue
| shape-outline1=white
| mark-size1=16
| mark-coord2 = {{Coord|52.61819|-1.11035}}
| mark-title2 = Congregational Church
| mark-coord3 = {{Coord|52.62324|-1.11179}}
| mark-title3 = Eastfield, Stanley Road
| mark-coord4 = {{Coord|52.62123|-1.111297}}
| mark-title4 = Stoneygate School
| mark-coord5 = {{Coord|52.62009|-1.11241}}
| mark-title5 = The Firs
| mark-coord6 = {{Coord|52.61936|-1.11510}}
| mark-title6 = White House
| caption = Edificis catalogats a Stoneygate
| auto-caption=1
}}

Les altres formes integrades es poden utilitzar de la mateixa manera (n-square, n-diamond, etc.). El valor shape-outline1= estableix el color del número (a diferència del normal, quan estableix el contorn de la forma), i com amb els altres, només els valors del paràmetre mark1 s'ha de configurar per establir el valor predeterminat d'aquest mapa, que es pot anul·lar segons sigui necessari. Els paràmetres numbered1..2..3 etc poden substituir els números o lletres automàtics per utilitzar els vostres propis valors per a cada marca. en:Template:Flushing Meadows-Corona Park map és un exemple útil de la vida real en forma de plantilla.

Ús en infotaules modifica

{{OSM Location map}} can be imbedded in infoboxes which allow the module parameter, for instance {{infobox school}} by using the instruction |module={{OSM Location map| ...}}. For an example, see St John Fisher Catholic School which uses the map to show its two sites within an infobox map. Some infoboxes also allow it to be incorporated within the caption below an image. However, this only works if an image and some caption text are also present. (see Inishmore Lighthouse).

Llista completa de paràmetres modifica

Demostració d'exemple multimarca, aeroport de Heathrow
{{OSM Location map
| coord={{Coord|51.46534|-0.44542}}
| zoom=12
| float = right
| width = 300
| height = 400
| fullscreen-option=
| caption = [[Fitxer:Heathrow Airport 014.jpg|360px]]<br>Amb cinc terminals, l'[[Aeroport de Londres-Heathrow]], és l'aeroport més concorregut d'Europa.
| title=Aeroport de Londres-Heathrow
<!-------->
| minimap = file
| mini-file = Greater London UK location map 2.svg
| mini-width = 150
| mini-height = 120
| minipog-gx = 14
| minipog-gy = 53
| minimap-boxwidth = 20
| scalemark = 160 
<!-------->
| shape = image <!-- començament de la primera etiqueta. Aquesta no hereta els valors dels paràmetres de la "marca mestre", mark1 i els seus valors de paràmetre s'han d'introduir completament. Altres etiquetes tenen un número adjunt al nom de cada paràmetre.-->
|   shape-color=
| shape-outline=
|          mark = Airplane silhouette.svg
|     mark-size = 20
|    mark-coord = {{Coord|51.471948|-0.487883}}
|         label = Heathrow Terminal 5
|        labela = 
|        labelb =
|    label-size = 13
|   label-color = hard red
|   label-angle =
|     label-pos = top
|label-offset-x = 19
|label-offset-y = 
|    mark-title = Heathrow Airport Terminal 1
|    mark-image = Heathrow Terminal 1 - geograph.org.uk - 581459.jpg
| mark-description=Terminal 1 at [[Heathrow Airport]], the busiest airport in Europe.
<!-- Les marques posteriors afegeixen un número de l'1 al 30 als noms dels paràmetres de les marques, es requereixen coordenades de marca per a cadascuna. La majoria dels valors dels paràmetres s'hereten de la marca "mark1" que actua com a "marca mestre" -->
| mark-coord1={{Coord|51.470156|-0.448497}}
| shape1 = image
| shape-color1=red
| shape-outline1=
| mark1 = Airplane silhouette.svg
| mark-size1 = 20
| label-color1 = hard red
| label1=Terminal 2
| label-size1=13
| label-pos1=bottom
| mark-title1 = Heathrow Airport Terminals 1 & 3
}}
Aeroport de Londres-Heathrow

Amb cinc terminals, l'Aeroport de Londres-Heathrow, és l'aeroport més concorregut d'Europa.
Codi en blanc - Plantilla de mapa d'OSM, amb una llista de tots els paràmetres
{{OSM Location map
| coord = {{Coord|  |  }}
| zoom=
| float = 
| width = 
| height = 
| fullscreen-option =
| caption = 
| title =

| minimap = 
| mini-file =
| mini-width =
| mini-height =
| minipog-gx =
| minipog-gy =
| minipog-boxwidth =
| scalemark =
    <!-- configuració predeterminada opcional. Aquests paràmetres "D" només creen valors de substitució per a les marques posteriors. No fan marques pròpies -->
|          shapeD = 
|    shape-colorD = 
|  shape-outlineD = 
|           markD = 
|      mark-sizeD = 
|       mark-dimD = 
|     label-sizeD = 
|    label-colorD = 
|    label-angleD =
|      label-posD = 
| label-offset-xD = 
| label-offset-yD =  

    <!-- conjunt de paràmetres sense numerar per crear una marca i/o una etiqueta al mapa -->
|     mark-coord = {{Coord|  |  }}
|           mark = 
|          shape = 
|    shape-color = 
|  shape-outline = 
|      mark-size = 
|       mark-dim = 
|          label = 
|         labela = 
|         labelb =
|     label-size = 
|    label-color = 
|    label-angle =
|      label-pos = 
| label-offset-x = 
| label-offset-y =  
|     mark-title = 
|     mark-image = 
| mark-description=

<!-- Text en un arc (A, B i C) sense efectes de forma, marca o pantalla completa, només text col·locat en un arc. Les coordenades són per a la primera lletra.-->
| arc-coordA={{Coord| | }}   
|  arc-textA=  
| arc-angleA=  
|   arc-gapA= 
| arc-radiusA= 
| arc-text-sizeA = <!-- per defecte és 12 --> 
| arc-text-colorA= 
| ellipse-factorA= <!-- per defecte és 1.0 --> 

<!-- marques numerades (de l'1 al 30). Els valors establerts a mark1 seran heretats per totes les altres marques numerades, tret que les substitueixi un valor "D".-->
|     mark-coord1 = {{Coord| | }}
|           mark1 = 
|          shape1 = 
|    shape-color1 = 
|  shape-outline1 = 
|      mark-size1 = 
|       mark-dim1 = 
|          label1 = 
|         labela1 = 
|         labelb1 =
|     label-size1 = 
|    label-color1 = 
|    label-angle1 =
|      label-pos1 = 
| label-offset-x1 = 
| label-offset-y1 =  
|     mark-title1 = 
|     mark-image1 = 
| mark-description1=

|    mark-coord2 ={{Coord|  |  }}
|          mark2 =
|         shape2 =
|   shape-color2 = <!-- ... i així successivament per a tots els paràmetres anteriors, per a tots els números fins a 30 -->
}}

Paràmetres modifica

Paràmetres de visualització del mapa
Paràmetre Descripció
coord Latitude and longitude coordinates of the centre point of the map. Use coord={{Coord2|latitude|longitude}}. {{Coord}} can deal with a wide range of formats. e.g.: coord={{Coord2|57|18|22|N|4|27|32|W}}, coord={{Coord2|44.112|N|87.913|W}}, coord={{Coord2|44.112|-87.913}}. This may not be the 'coord' points of the page, as an appropriate framing area for the map may place the subject off-centre. (Marker point(s) are set separately, see below). gridreferencefinder.com, is a helpful place to find coordinates, or you can right=click on the 'Full screen linked' map.
zoom Sets the scale of the map, from 0 to 19, to the levels defined by OpenStreetMap. (details here). The actual distances represented will vary depending on the latitude, as the scale defines different fractions of a degree. The apparent scale will also vary hugely depending on the monitor being used, the browser magnification level, etc. For most Wikipedia situations, maps with a zoom of 10 (notionally 1:500,000) up to 16 (1:8,000) are likely to be of most use.
float Positions the frame to the left, centre (or center) or right. (default is right). If centered, the text will be forced above and below, otherwise text will wrap to the side.
width height Sets the width and height of the map in pixels. Only the number is required (i.e. no px). Default is 350 by 250 pixels.
fullscreen-option By default an [Interactive Full screen] link is supplied in the bottom left of the frame. By setting this to 0 or no, the link will not appear, should that be preferred
nolabels By default the base map uses a map label model called 'osm-int'l', in which progressively higher zoom levels bring more place names onto the map. For some contexts it may be preferred to 'turn off' the place name labels, and use the mark/label options to provide such names as are wanted. By setting nolabels = 1 an alternative 'osm' base map is used, with no place name labels. (At higher zooms the road names still occur).
caption
auto-caption
Optionally, a text caption can be included, below the map. Unless overridden by tags etc., this is left-justified plain text. It can include any wiki-item that can be inserted into a table cell, including images, formatting, citation references, etc.
If auto-caption=1, a numbered list will be automatically generated to follow any caption. This will generally only make sense when using numbered dots.
title Optionally a title or other text can be placed in a cell above the map. By default this is centred and bold, but as with the caption, any wiki-markup etc. can be included.
map-data-heavy

map-data-light
map-data
map-data-text
map-data-color
map-data-width

Allows OSM ExternalData elements to be added to the map. This can be an administrative boundary, highway or other map element that has been assigned a wikidata Q value. (e.g.: map-data=Q83065 will add the city boundary of Leicester.) The map item needs to be on the same place as the map itself. It currently only allows line features (not areas etc.), which appear as various styles of line. Multiple elements can be added, separating each Q value by a comma. A major limitation, as of May 2017, is that it only appears on the 'fullscreen' map, not on the framed map on the page. Adding map-data items now should mean they appear on the page if and when this limitation is overcome. nominatim.openstreetmap.org/ has a search engine to identify data elements for which Q values have been assigned, or to add wikidata Q values to map elements.

For map-data-heavy and map-data-light, this will draw orange lines of thickness 9 and 3 pixels respectively. map-data is more flexible, so can default to an orange line of 6 pixels, but color (using format #XXXXXX) and width in pixels can be set, as can a text element which appears when the line is clicked on. This can include wikilinks.

minimap
Automated world map
Used to add an optional locator minimap in the bottom right or left corner. If set to on it adds a 'built in' small(ish) world map with a locator dot showing the position of the main map. (This is a feature supplied by the underlying 'Graph:' template, so the only control over it can only be bottom right and is to be set as on or off. Other 'mini' parameters should be left blank). If set to off or not included a map is not used.
External map
To allow a map from wikimedia commons, plus optional locator dot, set to file it requires the next section details to be added, which will include a custom map and can be placed in any of the four corners.
minimap=file bottom left
minimap=file bottom right
minimap=file top left
minimap=file top right

If just minimap=file is used it defaults to 'bottom right', but it is probably better to spell it out.

mini-file

mini-width
mini-height

Takes the file name of a standard location map from commons, and displays it as a minimap in the bottom right corner, provided minimap=file. This can be used to show a larger entity from which the main map is drawn.
minipog-gx

minipog-gy
minimap-boxwidth

Within the custom minimap this can place an optional small Red pog. Nb. The x and y are not lat and lon values. They relate to a 100x100 grid of the minimap at whatever size it is set to. The origin is top,left of the mini map, so if minipog-gx=25, it will be a quarter of the way across. (Some location maps have a highlighted location already, so leaving these two parameters undefined gives the map without a dot.)

minimap-boxwidth=xx can optionally use an open red box instead of a Red pog. xx = the pixel width of the box, and the height is then matched in proportion to the actual map. In general anything much below xx=15 will be better served by a dot. The required width will require some trial and error to pin down. If xx=0 or minimap-boxwidth is undefined, a Red pog is used.

scalemark By default or with scalemark=1, a scale line with guide to the scale of the map is supplied near the bottom right corner of the map. If this is not required - e.g. if it interfers with a map element at that point - it can be turned off by setting this to '0'. To shift it further left, e.g. to avoid a minimap, or to avoid a 'busy' bit of the map, enter the number of pixels. e.g. scalemark=180 will move it to the left of the built-in minimap. If not set by hand it will automatically shift to the left of any bottom-left minimap.
Paràmetres d'etiquetes i marques.
Es poden establir seixanta-una marques al mapa, sent una versió no numerada, i la resta numerada de l'1 al 60. La primera numerada, (mark1, label1, etc.) és una "marca mestre" i els seus valors (o valors per defecte) són heretats per lrs altres marques numerades tret que s'estableixin individualment. Tots els paràmetres d'etiqueta, marca i pantalla completa estan disponibles per a cada marca numerada.

Si la marca no numerada s'utilitza com a tema del mapa, serà el punt 1 del mapa de pantalla completa (tret que mark-title=none) i pot utilitzar valors específics de marca i etiqueta. La primera marca numerada té valors que seran heretats per les marques posteriors. Per a més flexibilitat, un conjunt de paràmetres amb un valor "D" en lloc d'un número anul·larà els valors mestres amb un valor Default (predeterminat) més general.

Paràmetre Descripció
shape OSM Location map can use either an external image as a location marker, or one of various built-in shapes. Shape should either be set as =image or can be a circle, square, cross, diamond, triangle-up or triangle-down. If blank or absent it will default to 'image', and use either a Red pog.svg or specified mark = image. If numbered dots are required, use shape1=n-circle Subsequent markers will use the same setting, and automatically number up to 30. shape1=l-circle will do the same but with letters, and any of the built in shapes can be used.
shape-color
shape-outline
numbered
Set the shape infill and outline to any color, using either the color names shown under 'label-color' blow, or hex triplets (e.g. #FF0000), as described at Web colors. Only used for built in shapes. Setting them to the same value gives an appearance of no outline. Default = #B80000 (a dark red). The numbered = parameter is used with numbered shapes, to override the automatically allocated number.
mark The name of a Wikimedia commons file, which is used as the marker. Default is Red pog.svg. Other pog colours are available, and a large range of map markers can be found at Commons:Location markers and Commons:Category:Map icons
mark-size
mark-dim
Size and dimensions of a marker. mark-size is used by both shape and mark to define the size of the marker symbol. It sets the height of the mark or shape in pixels (no 'px' required, default is 10). If only a text label is wanted with no marker, set mark-size=0.
mark-dim is used to give a non-square mark. (It has no effect with the built in shapes.) default is 1, i.e. equal width and height. A value of 1.4 will give a typical landscape rectangle. 0.7 will give a typical portrait rectangle. If the original mark-file is non square, a value here is needed to correct the proportions.
mark-coord Latitude and longitude coordinates of the marker point. Use the format mark-coord={{Coord|lat value|lon value}}. Used by either shape and mark as well as the related label. If the location is outside the area of the map, it will not appear. (for backwards compatibility mark-lat and mark-lon still work, but are not the preferred method.)
label
labela
labelb
Text to appear alongside a mark or shape. No inline formatting, line wrapping, or other tags, links etc. are possible. If left blank then any mark will show without a label. If only a text label is wanted with no marker, set mark-size=0 A blank label and a mark-size=0 will result in an invisible marker, which will still feature on the Full screen option. If the label is too long for a single line, use labela and labelb for 2nd and 3rd lines. nb if labelb is set without a labela, there will still be a gap where labela would go.
label-size Sets the text size for the label, in points. default = 10
label-color Sets the text colour for the label. The standard colour labels (red, black, grey, white, blue, green etc...) all work as described, but can be rather strident on the OSM map. Each of the colors below have three standard shades - soft, hard and dark. Default=dark grey. (Actually defaults to #222211, slightly darker than 'dark grey', so it is prominent when someone just puts a single pog and label.

Under normal usage, the following label color scheme should be followed:-

soft grey Settlements = soft grey (Subject of the map can be hard grey and larger label-size). Map areas with darker or busier backgrounds may need to move a shade darker to hard grey and dark gray respectively.
soft blue Rivers, lakes, sea areas etc = soft blue (Works well on top of OSM blue areas)
soft green Parkland, national/regional parks, gardens, forests etc = soft green works well on top of OSM green areas. (hard green may be desirable in forests or for the subject of the map)
hard red Use with care = dark red goes nicely with a red pog but can look like a redlink. Alas, no wikilinks possible on the map as yet.)
dark grey Individual sites = dark grey (no need to specify if the site has a single label to accompany a red pog)
Taula completa de colors recomanada per als mapes d'OSM.

Aquests tenen un to més pastel que els colors estàndard, així que combinen eficaçment amb els fons del mapa

soft red #DB3123 hard red #AA1205 dark red #7A0101
soft green #81AF81 hard green #538253 dark green #165916
soft blue #77A1CB hard blue #5581A9 dark blue #5581A9
soft grey #AAAA88 hard grey #777755 dark grey #333322
soft brown #CCB56C hard brown #AD7F14 dark brown #8E5913
Colors HTML estàndard.

Aquests tendeixen a semblar força durs als mapes d'OSM, però es conserven per compatibilitat

White #FFFFFF Silver #C0C0C0 Gray #808080
Red #FF0000 Maroon #800000 Yellow #FFFF00
Olive #808000 Lime #00FF00 Green #008000
Aqua #00FFFF Teal #008080 Blue #0000FF
Navy #000080 Fuchsia #FF00FF Purple #800080
Black #000000

It is also possible to specify any HTML Hex color using the six-figure hex-code, eg #AAAAAA, but sticking to defaults maintains consistency between pages

If no color is specified the text will have a default of 'dark grey'

Any text other than one of the named colors above or a hex code will return as 'dark grey'

label-pos Sets the position of the label, relative to the marker: left, right, top or bottom. Default=left. Top and bottom text is center-justified, whereas left and right align against the marker. The label aims to be an appropriate distance from the edge of the marker, but irregular shapes and larger sizes may need further adjustment using the label-offsets.
label-angle It is possible to specify a label-angle = , which will pivot the label text around the centre of the marker point by the specified number of degrees. (+ve angle rotates clockwise, -ve anticlockwise) If mark-size is set to zero, this has the effect of a free-floating label with no marker, useful for various geographic and linear features. For stylistic consistency all settlement names should not be given an angle.
label-offset-x
label-offset-y
Allows adjustment of the label location in an x and y direction, relative to its mark coordinates, by the specified number of pixels. It can be +ve or -ve numbers. Higher -x values will move the label to the right. Higher -y values move it down the map. Default is 0,0.
Contingut addicional per a l'enllaç de pantalla completa
El mapa de "pantalla completa" utilitza el mateix mapa base d'OSM, en un entorn de mapes diferent, inclosa l'opció perquè els usuaris l'ampliïn i el redueixin, es desplacen pel mapa i trobin (mitjançant el botó "Mapes externs") altres mapes i imatges referides a la ubicació. També inclou marques numerades, per als quals es poden mostrar títols d'estil informatiu i miniatures d'imatges amb subtítols. Això té més sentit quan hi ha diversos marques al mapa. El contingut d'aquesta instal·lació s'estableix amb els tres paràmetres següents, que s'han de numerar per a cada marca com per als altres atributs de la marca:
Paràmetre Descripció
mark-title This title appears as a tooltip and also a thumbnail title, accessed via the marker. if mark-title=none that will exclude that marker from the full screen map. (it will still show as normal on the main map).
mark-image This provides a pop-up thumbnail image when the marker is clicked. Include only the image name from Wikimedia commons etc. (i.e. no brackets, or 'File:').
mark-description Caption text, which will either accompany a pop-up photo, or if no photo then as a text box, when the marker is clicked. This can include wikilinks etc., to link on to additional relevant articles.
Arc Text: etiqueta col·locada sobre un arc
L'ús de paràmetres d'arc-text permet col·locar un text breu (fins a 20 caràcters) al llarg d'un arc, amb paràmetres per controlar el radi de l'arc i l'espaiat entre les lletres del text. La naturalesa del sistema de coordenades terrestre significa que hi haurà alguna variació en un arc a diferents latituds i a diferents nivells de zoom. De la mateixa manera, els canvis de radi també tindran algun efecte sobre la mida en l'espai del mapa, amb un radi més gran s'ocuparà més espai. Per tant, caldrà un cert grau de prova i correcció per obtenir la forma i l'efecte desitjats. Com a regla general, identifiqueu les coordenades del punt inicial necessari i, a continuació, trieu un patró inicial de la selecció a Text en un arc, i a continuació, ajusteu els paràmetres perquè s'ajustin als requisits del mapa. Els paràmetres següents són per al conjunt A. Els conjunts B i C també estan disponibles.
Parameter Descripció
arc-coordA coordinates of first letter, using ={{Coord|xxx.xx|yyy.yy}}
arc-textA= Add your text here
arc-angleA in degrees, -180 to 180. 0 will start as horizontal, -90 straight up, 90 straight down
arc-gapA 1= a notional 'standard'. 0.2 is very tight, 10 is very wide. Applying a negative gap will invert the letters and run the other way around the circle
arc-radiusA 1= a notional 'standard' 0.5 is quite a tight circle, 8 is so wide as to be almost flat, dependent on latitude and zoom level
arc-text-colorA sets text color. #000000 color hexes and standardised OSM Location map colors are accepted
ellipse-factorA will squash or stretch the circle. 1= notionally circular, 0.5 to 1.0 will flattern top and bottom, above 1.0 flattens the sides.

Tecnologia subjacent modifica

OSM Location map itself has no map or display ability of its own. Everything within the frame is produced through the template {{Graph:Street map with marks}}, created by User:Yurik. This in turn calls internal processes that turn all the data supplied at edit time into a rendered bitmap image, so that there is no calculation overhead by the time the page is read by a user, any more than any other commons image.

Whilst the map is being edited and previewed, the page is supplied with a rasterised image, collating the base-map, marks, labels, etc. on the fly. It will be particularly noticeable on small fonts that when the 'Publish Changes' button is pressed, the resulting bitmap has much worse fonts than the preview. (Maybe this will be improved at some point). The process of updating the map image and providing the right bitmap is all handled internally and invisibly. One of the consequences of the 'bitmap' solution, which is different from the standard {{Location map}} method, is that there is no text or objects on the final image, so there is no possibility of adding wikilinks within the template.

The full screen option, which can be clicked through from below the map, provides an entirely different mapping approach, using the same base-map data. This provides an interactive map that can be panned and zoomed. It also replicates (although at present only as numbered markers) the various marks from the page map. These can then be given more content, by way of a title, caption and image along with displaying the coordinate values. The caption and title can then be given all the wikilinks and other markup features that may be desired, providing a map-based page that will offer another way of engaging with the article content.

Future development of the various mapping technologies is likely to result in further options for showing maps on Wikipedia. In particular, {{maplink}}, which initially just created a text link to a full-screen map, can now create a framed image including dot-markers, roads, boundaries, etc., and can acquire data directly from wikidata to do this. Again, the processor overheads are reduced by initially showing a bitmap, which can be clicked to become interactive within its frame. Maplink is being effectively rolled out within info-boxes, where the map is automatically generated from already available data.

This template, on the other hand, is probably better suited to a hand-editable map, in which the area displayed and the selection of items and labels included are selected, edited, and added to, to suit the specifics of the subject in hand. A further approach, which is not currently supported within this template, but is available via the inderlying {{Graph:Street map with marks}} template, is to draw the data from Wikidata, using a SPARKL query that provides the selection of marks requested.

The 'Graph' technology used here is described as under development, so while it is highly likely that this or a similar solution will still be available, it may evolve over time.

Vegeu també modifica

Plantilla Descripció
Específiques de mapes
{{Map draw}} Utilitzen l'OpenStreetMap, permetent la forma interactiva a pantalla completa i modificant el zoom. Així no cal crear un mapa. Permet dibuixar-hi marques (numèriques o d'icones) sense etiquetes (en mode no interactiu), línies, cercles, polígons, àrees predeterminades o àrees creades i desades a Commons.
{{OSM Location map}} Permet dibuixar-hi marques (numèriques o d'icones) amb/sense etiquetes, peu de mapa, mapa de mini-localitzador i dibuix superposat.
{{Location map}} Utilitzen (les mateixes) definicions de mapes, a crear o de ja existents a Categoria:Mòduls de mapes. Mapes de relleu i històrics. Es poden incloure en la mateixa plantilla diversos mapes. Permet un dibuix superposat. Col·loca una sola marca (usualment amb etiqueta) sobre un mapa, segons una ubicació de coordenades.
{{Location map+}} Com {{Location map}}, però amb múltiples marques amb etiquetes, etiquetes soles o marques soles. Preferible a la següent plantilla.
{{Location map many}} Mantinguda per compatibilitat
Per un propòsit general
{{Overlay}} Col·loca fins a 30 etiquetes de números o de colors en la imatge, tot creant una llegenda, en una posició relativa per a cada etiqueta
{{Site plan}} Col·loca una imatge d'una marca (a escollir) sobre una imatge, de mida seleccionable, en una posició relativa
{{Superimpose}} o {{Sobreposat}} Col·loca una sola imatge sobre una altra, en una posició absoluta
{{Superimpose2}} Com l'anterior, però per col·locar fins a 50 imatges.