Help:Extension:Kartographer/hu

Ez az oldal dokumentálja, hogy hogyan használja a Kartographer kiterjesztést és annak a (térképkeret) és a  (térképlink) címkéket.

Az első lépések
 Ez a kód beilleszt egy egyszerű interaktív térképet (olyat, mint, amit a jobb oldalt is látsz), azzal a lehetőséggel, hogy kettős kattintásokkal maximalizálni lehessen a térképet, vagy ez elérhető a jobb sarokban szereplő ikonra történő kattintással is.

The  parameter overrides the default alignment to left, right, or center. Ez a  (ráközelítés) funkció lehetővé teszi a ráközelítést 0 és 19-szeres érték között. A 0 a legtávolabbról mutatja az adott területet, míg a 19 a legjobban ráközelített nézet látható.

használata
 { "type": "Feature", "geometry": { "type": "Point", "coordinates": [-122.3988, 37.8013] }, "properties": { "title": "Exploratorium", "description": "", "marker-symbol": "museum", "marker-size": "large", "marker-color": "0050d0" } }

The content of the tag has to be either empty or a valid GeoJSON with styling, as produced by a GeoJSON editor. Kartographer supports the simplestyle specification with Maki icons (Licensed under Creative Commons Zero). Maps/Icons contains a full list of supported icons.

Frames
Frameless maps are good for insertion as part of a template, whereas framed maps are good for insertion directly into the page, either by hand or by using the visual editor.


 * To insert a map without a frame, add the "frameless" attribute:
 * To add a caption, use the  attribute.

Note: Adding the text attribute automatically enables a frame, even if there is a  attribute.

==

Az még elfogadja extra paraméterként a "szöveget", ahhoz, hogy specializálja a linkszöveget a koordináták helyett:

The tag may contain the same geojson as.

=== attribute. Without this attribute, the coordinates will be shown (example:  is set to the magic   or   value. In this case each   will be replaced with an incremental counter , and   with   values.

If GeoJSON has more than one counter, the value of the first one will be shown as the link text. Optionally, editors may add a suffix to have multiple counters on the page at the same time. This way  will have different counter from.

It would make sense to use a distinct color for each counting group. All data added via will also be shown in all maps inserted with, unless the   attribute is used.

kibővíthető még

The attributes,  , and   control the location of the popup map. Use  for the text of the link (could be any valid wikitext markup). Use  to add the contents of this tag to the named group (see below).

Markers
Markers can be added to maps to denote a location. These features are added using the JSON format.

Note: These examples use, but the formatting for   is the same.

Eredmény:

A kijelölők tartalmazhatnak még információkat például képeket és linkeket a cikkekhez.

Eredmények (a kijelölővel lép kapcsolatba, hogy meg lehessen nézni az eredményét):

Wikidata azonosítók az OSM (Open Street Map) adatai használhatóak határok kiemelésére a geoshape (földrajzi forma) szolgáltatással.

Eredmény:

A Wikidata azonosítók használhatóak arra is, hogy a térkép egy adott kiválasztott régióját elrejtsék.

Eredmény:

A kijelölőket meg lehet számozni.

Eredmény:

A kijelölők (markerek) használhatnak betűket is.

Eredmény:

Többféle térképkijelölés különböző méretekben történő használatával egy kiemelt gyűjtemény is létrehozható.

Eredmény:

Adj hozzá különböző színű térképkijelölőket és különböző számlálókat.

Eredmény:


 * Map markers can use any color that has a RBG value (a quick internet search of "rgb color picker" will show several options).
 * Markers can be one of three different sizes: small, medium or large.
 * GeoJSON that is created elsewhere can be copied (in accordance with licensing and copyright restrictions) and then pasted into maplink (for example)
 * If you are creating maps on Wikivoyage, it might be a good idea to use Groups (see below).
 * If you want to learn more about adding external data to your map, see the External data section.

Csoportok
For use on the Wikivoyage project, there is a need to show a map whose data is defined somewhere else on the page. For example, there may be multiple points of interest (POI) defined with tags, and one common map on the side of the page that shows them all.

The grouping concept allows editors to share data between multiple and  tags.

By default, the data inside the or  tag is shown only for that one tag, and will not be shown anywhere else.

If or  specify the   attribute, the data inside those tags will be placed into a named group, together with all the other data by the same group name. As a result, any tags with the same group name will show the same map data, and each tag may incrementally add data to the group.

A tag may also show other groups, regardless if it belongs to a group or not, by specifying the  attribute. Comma-separated multiple group names may be specified. The group name may only contain lower case English letters. This matrix shows what data will be shown for each tag.

Külső adatok
 { "type": "ExternalData", "service": "geoshape", "ids": "Q797" }

In addition to drawing polygons using GeoJSON, you may also get outlines of the well known geographical objects by their Wikidata ID if they are marked as such in the OpenStreetMap database. For example, the Wikidata item for Alaska is Q797, and we can draw it on a map by using the "external data" reference. More than one ID may be specified separated by a comma. To create a mask over the areas of interest, use the "geoshape" service. To invert this and create a mask over everything else, use the "geomask" service.

GeoShapes a Wikidata Query-n keresztül.
 { "type": "ExternalData", "service": "geoshape", "query": " SELECT ?id ?head (SAMPLE(?img) as ?img)   (min(?partyId) as ?party)   (if(?party = '0', '#800000', if(?party = '1', '#000080', '#008000')) as ?fill)  (concat(, ?headLabel, ) as ?title)  (concat(?stateLabel, '\\n', '') as ?description) WHERE {    ?id wdt:P31 wd:Q35657 .  ?id wdt:P6 ?head .  ?head wdt:P102 ?party .  BIND(if(?party = wd:Q29468, '0', if(?party = wd:Q29552, '1', '2')) as ?partyId)   SERVICE wikibase:label {    bd:serviceParam wikibase:language 'en' .    ?head rdfs:label ?headLabel .    ?id rdfs:label ?stateLabel .  }  OPTIONAL {    ?head wdt:P18 ?img .  }  ?link schema:about ?head .  ?link schema:isPartOf  . } GROUP BY ?id ?head ?headLabel ?link ?stateLabel "}

While this helps with the simple use cases when the Wikidata ID is well known, sometimes you may want to get a list of IDs as a result of a Wikidata query. A SPARQL query gets a list of all US states in the ID column of the result, and geoshapes service adds the geometrical outlines for each state. All other columns in the SPARQL query result become values in the "properties" object. The "fill" column changes the color of the state. The "title" column shows state governor's name, and "description" has wiki markup to show the state name and the governor's picture. To edit this query, copy the query parameter after the "#" symbol at ''' https://query.wikidata.org/#... ''':

Térképadatok a Commons-ból

 * További információk: 

A Commonsban tárolt térképadatok fel lehetnek tüntetve a térképen. Például: c:Data:Neighbourhoods/New York City.map:  { "type": "ExternalData", "service": "page", "title": "Neighbourhoods/New York City.map" }

Többszörös adattípusok kombinálása
 [ {    "type": "ExternalData", "service": "geoshape", "ids": "Q13518258", "properties": { "stroke": "#ffb100", "stroke-width": 6, } },  {    "type": "Feature", "geometry": { "type": "Point", "coordinates": [4.75566, 44.104498] }, "properties": { "title": "Porte de Castellan" } },  {    "type": "Feature", "geometry": { "type": "Point", "coordinates": [4.75829, 44.10258] }, "properties": { "title": "Porte Léon Roche" } } ]

You can combine ExternalData, Feature, and FeatureCollection together in the same &lt;mapframe> or &lt;maplink> element:

 [ {    "type": "ExternalData", "service": "page", "title": "Neighbourhoods/New York City.map" }, {    "type": "ExternalData", "service": "geoshape", "ids": "Q160409", "properties": { "fill": "#07c63e", "title": "Central Park" } },  {    "type": "Feature", "properties": {"title": "Roosevelt Island", "marker-color": "f01080"}, "geometry": { "type": "Point", "coordinates": [ -73.94511222839355,       40.76734665426719      ]    }  } ]

A Commonsból származó térképadatok kombinálhatók más adattípusokkal:

Wikidata ID elemek stilizálása
 { "type": "ExternalData", "service": "geoline", "ids": "Q2108", "properties": { "title": "Highway I-696", "description": "", "stroke": "#ffb100", "stroke-width": 8 } }

Külső adatokért adj hozzá stílusokat és címeket, használva a properties (tulajdonságok) kulcsszót:

A legfőbb stilizáló kulcsok a következők: "stroke" (szín), "stroke-width" (szélesség), "stroke-opacity" (átlátszóság), "fill" (szín telítettsége), "fill-opacity" (átlátszóság telítettsége).

Egymást átfedő elemek
Map elements that overlap are drawn in the order in which they are written in the code. For instance, if a map includes two lines that overlap, the line that is defined first will appear beneath the line that is defined second. The following examples show how this can affect the appearance of the map:

 { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {"fill": "#ff0000","fill-opacity": 0.7,"stroke-width": 0}, "geometry": { "type": "Polygon", "coordinates": [ [ [ 77.926025390625, -25.150257104114733 ], [ 80.14251708984374, -25.150257104114733 ], [ 80.14251708984374, -24.43714786161562 ], [ 77.926025390625, -24.43714786161562 ], [ 77.926025390625, -25.150257104114733 ] ] ] } }, { "type": "Feature", "properties": {"stroke": "#fffa00","stroke-width": 5}, "geometry": { "type": "LineString", "coordinates": [ [ 77.926025390625, -25.150257104114733 ], [ 80.14251708984374, -24.43714786161562 ] ] } }, { "type": "Feature", "properties": {"stroke": "#000000","stroke-width": 5}, "geometry": { "type": "LineString", "coordinates": [ [ 77.926025390625, -24.43714786161562 ], [ 80.14251708984374, -25.150257104114733 ] ] } } ] }

The code for the map above includes three elements, all of which use GeoJSON's "feature" functionality. The first feature is a "Polygon" - the red rectangle. This is followed by two "LineString" features. The yellow line is defined first, so it appears beneath the black line. Note that the hierarchy used to draw elements applies regardless of whether the data is raw GeoJSON or comes from a Wikidata ID or Commons data page.

The map below changes the order from that of the first example: the black line is defined first and is thus moved to the bottom of the stack:  { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {"stroke": "#000000","stroke-width": 5}, "geometry": { "type": "LineString", "coordinates": [ [ 77.926025390625, -24.43714786161562 ], [ 80.14251708984374, -25.150257104114733 ] ] } }, { "type": "Feature", "properties": {"fill": "#ff0000","fill-opacity": 0.7,"stroke-width": 0}, "geometry": { "type": "Polygon", "coordinates": [ [ [  77.926025390625,  -25.150257104114733  ],  [  80.14251708984374,  -25.150257104114733  ],  [  80.14251708984374,  -24.43714786161562  ],  [  77.926025390625,  -24.43714786161562  ],  [  77.926025390625,  -25.150257104114733  ]  ]  ]  } }, { "type": "Feature", "properties": {"stroke": "#fffa00","stroke-width": 5}, "geometry": { "type": "LineString", "coordinates": [ [ 77.926025390625, -25.150257104114733 ], [ 80.14251708984374, -24.43714786161562 ] ] } } ] }

Hozzárendelési lehetőségek
The following table shows how a map can be formatted for display on a wiki page. The table contains two columns: the first shows an interactive map via the tag, and the second showing the rendering of an example image with the same options.

Térképek nyelve
As of May, 2018, map labels will try to use the language of the wiki where the embedded map is displayed. If that language is not available, then the map will use the languages configured as fallback(s) in MediaWiki for that language. If the label is not available in a fallback language, then English is used. Finally, if no language is available, then the map will display labels in the language of the territory mapped.

You can specify the language to use for labels by adding the  followed by the desired language code. e.g. lang="ja" to display labels in Japanese (if available).

Eredmény:. This shows map labels in the languages of the area mapped (essentially opting out of internationalization).

Maps use map data, including map label data for all languages, from the open-source mapping project OpenStreetMap. If the map you want to display doesn’t offer labels in the desired language, you can add labels in that language by adding them to OpenStreetMap. To get you started, there is an OpenStreetMap Beginners’ Guide, and guidance about naming conventions.

Lásd még

 * Az Open Street Maps elemek információinak használata a térképeken
 * Maps project (2015-2017) - Documentation on the Wikimedia engineering activity from the Discovery team from 2015 to 2017
 * Map improvements 2018 - Documentation on the Wikimedia engineering activity from the Collaboration team in 2018
 * Technical details of the Wikimedia implementation of Kartographer
 * Kartographer Developer guide