Help:Extension:Kartographer/hu

 Main help pages: A kiterjesztés lehetővé teszi interaktív és statikus térképek létrehozását a Wikimédia wiki oldalakon. Ez az oldal egy részletes leírás a Kartographer használatáról, beleértve a számos lehetőséget, amelyek a következő címkék használatakor rendelkezésre állnak:, amely közvetlenül a wiki oldalakba ágyazza a térképeket, és , amely linkeket hoz létre egész oldalas interaktív térképekre, és kitér a GeoJSON Kartographer által támogatott elemeire. Az oldal alján rengeteg példát találsz.
 * How to use Kartographer in VisualEditor
 * Introduction to Kartographer in wikitext
 * current: How to use Kartographer - extensive help page

A Kartographerrel és az OpenStreetMaps-szel kapcsolatos segítségért nézd meg ezt:.



Alapvető térképszintaxis
Egy térkép vagy térkép link elhelyezéséhez közvetlenül egy wiki oldalon, a Kartographer két elemet kínál:, amely beágyazza a térképet, amely egy teljes képernyős interaktív térképre hivatkozik, és , amely gazdag szöveget hoz létre (opcionális jelöléssel), amely egy teljes képernyős interaktív térképre hivatkozik.

Néhány wiki ezeket az elemeket sablonokba csomagolja, mint például a Mapbox és a Mapframe. Nézd meg a helyi wiki Kartographer súgó oldalát, hogy van-e a wikidnek sablonja -- vagy használd közvetlenül az elemeket és ezt a dokumentumot csak útmutatóként.



A elem beágyazza a térképet egy wiki oldalba. Az elemnek vagy üresnek kell lennie, vagy GeoJSON-t kell tartalmaznia. A GeoJSON írásával kapcsolatos további forrásokért lásd alább.

A elem egy teljes képernyős térképre mutató linket hoz létre.

* = required

Önzáró címkék
Ha nincs használva a GeoJSON, akkor a és  önálló önzáró elemként használható.

Önzáró:

Beépített GeoJSON:

GeoJSON
 { "type": "FeatureCollection", "features": [ {     "type": "Feature", "properties": { "marker-symbol": "-number", "marker-color": "302060" },     "geometry": { "type": "Point", "coordinates": [ -122.41816520690917,         37.79097260220947        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-number", "marker-color": "302060" },     "geometry": { "type": "Point", "coordinates": [ -122.40786552429199,         37.799654055191525        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-number", "marker-color": "302060" },     "geometry": { "type": "Point", "coordinates": [ -122.40185737609865,         37.796262984039544        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-number", "marker-color": "302060" },     "geometry": { "type": "Point", "coordinates": [ -122.38743782043457,         37.80535070427755        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-number", "marker-color": "302060" },     "geometry": { "type": "Point", "coordinates": [ -122.38005638122557,         37.795449103799726        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-letter", "marker-color": "208020" },     "geometry": { "type": "Point", "coordinates": [ -122.40941047668457,         37.81850557172186        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-letter", "marker-color": "208020" },     "geometry": { "type": "Point", "coordinates": [ -122.40357398986815,         37.81280993744834        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-letter", "marker-color": "208020" },     "geometry": { "type": "Point", "coordinates": [ -122.39842414855956,         37.8071138637568        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-number-bar", "marker-color": "f01080" },     "geometry": { "type": "Point", "coordinates": [ -122.41181373596191,         37.78595317184089        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-number-bar", "marker-color": "f01080" },     "geometry": { "type": "Point", "coordinates": [ -122.39542007446289,         37.787674400057654        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-number-bar", "marker-color": "f01080" },     "geometry": { "type": "Point", "coordinates": [ -122.38649368286131,         37.78401144262929        ]      }    }  ] }

Az és  címkék lehetnek üresek vagy tartalmazhatnak érvényes GeoJSON-t, hogy a térképet jelölésekkel lássuk el, alakzatokat rajzoljunk, és maszk területet alkalmazzunk.

Ha részletesebben szeretnéd megismerni ezt az átfogó témát, olvasd el ezt a hasznos bevezetés a GeoJSON-ba, valamint a teljes GeoJSON specifikációt.

Markers
Maps that use GeoJSON may contain one or more markers to point out special locations. These markers are set using marker-specific keywords under the "properties" level in GeoJSON.

Kartographer supports the simplestyle specification with Maki icons, which are available under the CC0 license. See the full list of supported icons.

Eredmény:

Auto-counters
Multiple markers on a map can be grouped and named using patterns and counters. Below is a summary of styling attributes for items placed on a map using GeoJSON. For more information, see the simplestyle spec.

For a rich variety of examples, see the Examples section.

Shapes, lines and points
GeoJSON allows you to add lines, geometric areas and points as annotations to your map. You can define them inline or import them from external databases.

Inline
GeoJSON allows you to draw points (markers), simple lines and geometric areas as part of your map definition. The following examples include the "geometry" attribute of GeoJSON objects inside a object. Consult the full GeoJSON specification for more information.

External data
 { "type": "ExternalData", "service": "geoshape", "ids": "Q797" }

GeoJSON allows you to import geographical objects from external sources using the "type" attribute with the value "ExternalData".

Maps can draw from well-known geographical objects in the OpenStreetMap database by using their Wikidata ID (also via Wikidata SPARQL queries).

Additionally, maps can link directly to raw GeoJSON stored on Wikimedia Commons (.map files): see for details.

Objects can be rendered using data from an external source in these different ways:
 * - Draws a marker.
 * - Draws a simple line.
 * - Draws a polygon with a shaded interior.
 * - Draws a polygon and shades everything outside the polygon.
 * - path to a .map file on Wikimedia Commons that contains valid GeoJSON.

Via Wikidata ID
Wikidata IDs are relatively new to the OSM community. As of early 2022 there are roughly 1.9 million elements with Wikidata IDs. You can add your own at https://www.openstreetmap.org/ -- be sure to add the  tag and the corresponding   value. The data typically becomes available to Kartographer within two days. Learn more at the OSM wiki.  { "type": "ExternalData", "service": "geoshape", "ids": "Q34713,Q701153" }  { "type": "ExternalData", "service": "geopoint", "ids": "Q667450, Q15958518" }

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" }  { "type": "ExternalData", "service": "geopoint", "query": "SELECT DISTINCT ?id ?geo (?idLabel AS ?title) (?typeLabel as ?description) (if(?type = wd:Q860861, '#800000', if(?type = wd:Q245117, '#000080', '#008000')) as ?marker_color) WHERE { ?id wdt:P136 wd:Q557141; wdt:P625 ?geo; wdt:P276 wd:Q2103147; wdt:P31 ?type. SERVICE wikibase:label { bd:serviceParam wikibase:language 'en, nl'. ?id rdfs:label ?idLabel. ?type rdfs:label ?typeLabel} .}" } Instead of a Wikidata Item ID, a map can also derive data from a Wikidata query in SPARQL. (You can create SPARQL queries using the Query Builder.)

For detailed instructions, see.



Térképadatok a Commons-ból
 { "type": "ExternalData", "service": "page", "title": "Neighbourhoods/New York City.map" } 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:


 * További információk: 

Mask layer
 { "type": "ExternalData", "service": "geomask", "ids": "Q34713", "properties": { "fill": "#555555", "fill-opacity": 0.5, "stroke": "#000000", "stroke-width": 1, "stroke-opacity": 1 } }

A mask is just an inside-out shape, specified in the same way but with the exterior of the shape shaded.

Többszörös adattípusok kombinálása
You can combine ExternalData, Feature, and FeatureCollection objects together in the same or  element, for example to highlight features with titles and descriptions on top of externally sourced objects.

A Commonsból származó térképadatok kombinálhatók más adattípusokkal: See #Mixed types for various combinations.

Styling shapes
 { "type": "ExternalData", "service": "geoline", "ids": "Q2108", "properties": { "title": "Highway I-696", "description": "", "stroke": "#ffb100", "stroke-width": 8 } }

In addition to the marker styling above, lines and areas support these simplestyle properties:

Egymást átfedő elemek
Azon térképelemek, amelyek egymást kitakarnák a térképen, abban a sorrendben fognak láthatóvá válni, amilyen sorrendben a kódba be lettek illesztve. Példának okáért: ha a térkép két olyan vonalat tartalmaz, amelyből az egyik kitakarná a másikat, akkor az először definiált vonal jelenik meg először, a második fölöttiként. A következő példák szemléltetik azt, hogy hogyan is jelenik meg mindez a térképeken: If a map includes two lines that overlap, the line defined first will appear beneath the line defined next. This applies to any elements defined in the code that draw on the map.

Examples
 { "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 ] ] } } ] }

Reference

 * Full GeoJSON specification (RFC7946)
 * GeoJSON on English Wikipedia
 * simplestyle spec used by Kartographer
 * Maki icon set used by Kartographer

Guides

 * HERE.com's intro to GeoJSON
 * A guide to the GeoJSON.io editor

Editors and tools

 * GeoJSON.io editor
 * Vector.rocks editor
 * GeoJSON linter to validate your GeoJSON

<span id="Groups_for_Wikivoyage">

Csoportok
The Wikivoyage project needs to display maps whose data is defined elsewhere on the page. There may be multiple points of interest (POI) defined with tags, all of which appear on a single common map on the side of the page. (See an example using the city of Salzburg.)

A csoportosítási koncepció lehetővé teszi a szerkesztőknek, hogy adatokat osszanak meg többszörösen a $mapframe és a $maplink címkéi között.

Normally, the data inside a or  tag is shown only on the map created by that tag and nowhere else.

But on Wikivoyage, if a tag includes the   attribute, the data inside those tags will be placed into a named group alongside all the other data with the same group name. Tags with the same group name will display on a single map data; each tag incrementally adds data to the group.

Each tag on a Wikivoyage tag displays an embedded map displaying the groups specified in its tag.

A map may also show additional groups by specifying the  attribute. Multiple group names may be specified, separated by comma. A group name may only contain lower case Latin letters. This grid illustrates the data that will be shown for each tag.

Example:

Languages and fallbacks
Kartographer maps get their labels from the open-source mapping project OpenStreetMap (https://www.openstreetmap.org/). A 2018 májusi állapot szerint a térképcímkék megpróbálják annak a wikinek a nyelvét használni, ahol a beágyazott térképek megjelennek. Amennyiben az a nyelv nem elérhető, akkor a térkép azt a nyelvet fogja megjeleníteni, amely fallback(s) in MediaWiki konfigurálva van az adott nyelvvel. Ha az adott címke nem elérhető egyéb konfigurált nyelveken, akkor az angol nyelvű szöveg jelenik meg automatikusan. Végül, ha nem érhető el egyetlen nyelv sem, akkor a térképen megjelenő címkék azon a nyelven jelennek meg, amely a térkép által megjelenített területen használatban van. If that language is not available, then the map will use the given wiki's configured fallback language, then the local language in the map region specified in the Kartographer map. If none of these are available, Kartographer will display no label.

You can specify the language to use for labels with the  attribute and by setting its value to the desired language code Example:   will display labels in Japanese, if available.

To use the language local to the map area, specify. For more information about using the local language in your labels, and about OpenStreetMap multilingual data in general, read this post. Kartographer maps get their data, including map label data in all available 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 always add labels in that language by adding them yourself to OpenStreetMap. Note that country and city names are drawn from label nodes in OpenStreetMap, not from the data attached to boundary relations. To get started, see the OpenStreetMap Beginners’ Guide and these best practices in naming conventions.

Simple
<mapframe text="San Francisco museums" width="350" height="350" zoom="13" longitude="-122.3988" latitude="37.8013"> { "type": "Feature", "geometry": { "type": "Point", "coordinates": [-122.3988, 37.8013] }, "properties": { "title": "Exploratorium", "description": "", "marker-symbol": "museum", "marker-size": "large", "marker-color": "0050d0" } }

Groups of automatic counters
<mapframe text="Several groups of automatic counters" width="350" height="350" zoom="13" longitude="-122.39902496337889" latitude="37.80151060070086"> { "type": "FeatureCollection", "features": [ {     "type": "Feature", "properties": { "marker-symbol": "-number", "marker-color": "302060" },     "geometry": { "type": "Point", "coordinates": [ -122.41816520690917,         37.79097260220947        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-number", "marker-color": "302060" },     "geometry": { "type": "Point", "coordinates": [ -122.40786552429199,         37.799654055191525        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-number", "marker-color": "302060" },     "geometry": { "type": "Point", "coordinates": [ -122.40185737609865,         37.796262984039544        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-number", "marker-color": "302060" },     "geometry": { "type": "Point", "coordinates": [ -122.38743782043457,         37.80535070427755        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-number", "marker-color": "302060" },     "geometry": { "type": "Point", "coordinates": [ -122.38005638122557,         37.795449103799726        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-letter", "marker-color": "208020" },     "geometry": { "type": "Point", "coordinates": [ -122.40941047668457,         37.81850557172186        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-letter", "marker-color": "208020" },     "geometry": { "type": "Point", "coordinates": [ -122.40357398986815,         37.81280993744834        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-letter", "marker-color": "208020" },     "geometry": { "type": "Point", "coordinates": [ -122.39842414855956,         37.8071138637568        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-number-bar", "marker-color": "f01080" },     "geometry": { "type": "Point", "coordinates": [ -122.41181373596191,         37.78595317184089        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-number-bar", "marker-color": "f01080" },     "geometry": { "type": "Point", "coordinates": [ -122.39542007446289,         37.787674400057654        ]      }    },    {      "type": "Feature", "properties": { "marker-symbol": "-number-bar", "marker-color": "f01080" },     "geometry": { "type": "Point", "coordinates": [ -122.38649368286131,         37.78401144262929        ]      }    }  ] }

Wikidata query
<mapframe longitude="-110" latitude="52" zoom="3" width="500" height="500" text="Governors of US states with their party affiliation"> { "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 <https://en.wikipedia.org/> .} GROUP BY ?id ?head ?headLabel ?link ?stateLabel" }

Map data from Commons
<mapframe width="300" height="400"> { "type": "ExternalData", "service": "page", "title": "Neighbourhoods/New York City.map" }

Mixed types
<mapframe text="Caderousse city wall" width="300" height="300" zoom="15" longitude="4.75600" latitude="44.10200"> [ {    "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" } } ]

Mixed types with markers
<mapframe width="300" height="300" zoom="12" longitude="-73.965278" latitude="40.782222"> [ {    "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      ]    }  } ]

Rendering options
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 shows the rendering of an example image with the same options.

Use the width value  in order to make the map take up the full width of the page. <mapframe width="full" height="200" zoom="13" longitude="-122.39953994750977" latitude="37.81032643553478"> <mapframe width="full" height="200" zoom="13" longitude="-122.39953994750977" latitude="37.81032643553478" frameless>

Styling
<mapframe text="Interstate Highway I-696" width="300" height="300" longitude="-83.2297" latitude="42.4883" zoom="9"> { "type": "ExternalData", "service": "geoline", "ids": "Q2108", "properties": { "title": "Highway I-696", "description": "", "stroke": "#ffb100", "stroke-width": 8 } }

Lásd még

 * Special:MyLanguage/Help:VisualEditor/Maps - How to add and edit maps with the visual editor
 * Using Kartographer with OpenStreetMap
 * 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
 * Kartographer Developer guide
 * Terms of Use for Maps
 * Terms of Use for Maps