Modelo:Graph:Street map with marks/uso
![]() | Esta é a subpáxina de documentación de "Modelo:Graph:Street map with marks". Contén información de uso, categorías e outros contidos que non forman parte do modelo orixinal. Atención: As ligazóns interwiki engádense no Wikidata. |
![]() | O código mantense en https://www.mediawiki.org/wiki/Template:Graph:Street_map_with_marks Por favor, non o modifiques aquí. É máis axeitado facer as melloras en MediaWiki e despois copialas aquí. This code is maintained at https://www.mediawiki.org/wiki/Template:Graph:Street_map_with_marks |
Uso
[editar a fonte]Obxectivo: Mostra unha imaxe dun mapa (tirada de OpenMaps), con imaxes ou iconas enriba dela, especificadas polo usuario, utilizando coordenadas de latitude e lonxitude, ou tirando datos de Wikidata.
Parámetro | Descrición | Tipo | Estado | |
---|---|---|---|---|
data | 1 | Comma separated list of JSON objects that describing what data to draw on the map | Cadea de caracteres | recomendado |
width | width | Total width of the graph | Número | opcional |
height | height | Total height of the graph
| Número | opcional |
padding | padding | sen descrición | Número | opcional |
lat | lat | Latitude do centro do mapa | Número | opcional |
lon | lon | Lonxitude do centro do mapa | Número | opcional |
zoom | zoom | Nivel de zoom do mapa (0..18) | Número | opcional |
wdqs | wdqs | An optional Wikidata query to use instead of the data - the query would generate a list of items just like data, but it must contain a "coord" field with the location | Cadea de caracteres | opcional |
colorScaleField | colorScaleField | If given, this data field will be used to make dots of different color, one color per unique value of this field | Cadea de caracteres | opcional |
minimap | minimap | If set, 0 or false will always hide the map, and 1 or true will always show it. Make sure the map is big enough include the minimap. By default, the map will be shown for zoom levels 5+ if the map is sufficiently large | Lóxico (booleano) | opcional |
Exemplos
[editar a fonte]Código | Resultado |
---|---|
Mapa simple con marca simple, tamaño a medida, e sen minimapa{{Graph:Street map with marks | width=800 | height=600 | lat=42.8806 | lon=-8.5443 | zoom=18 | minimap=false |
{ "lat": 42.8806, "lon": -8.5443 }
}}
|
|
Mostrar volcáns, tirando os datos de Wikidata O resultado da consulta debe ter as mesmas columnas (campos) como nos outros exemplos ( texto, imaxe, ... )
{{Graph:Street map with marks | width=800 | height=400 | lat=42 | lon=-8 | zoom=1 | colorScaleField=type | wdqs=
SELECT (SAMPLE(?coord) as ?coord) (SAMPLE(?type) as ?type)
WHERE {
?item wdt:P625 ?coord .
?item wdt:P31 wd:Q8072 .
}
GROUP BY ?item
}}
|
See Wikidata query. |
{{Graph:Street map with marks | lat=42.3363 | lon=-7.8636 | zoom=7 |
{
"lat": 42.3363,
"lon": -7.8636,
"img": "wikirawupload:{{filepath:Ourense, Catedral, torre.JPG|48}}",
"width": 30,
"height": 45,
"text": "Catedral de Ourense",
"textFontWeight": "bold",
"textFontSize": 10,
"textColor": "#00f",
"textAlign": "right",
"textDx": 125
}
}}
|
Véxase tamén
- Ligazóns externas