Extension:Kartographer/es

This page is a translated version of the page Extension:Kartographer and the translation is 46% complete.
Extensión matemática MediaWiki
OOjs UI icon advanced-invert.svg
Kartographer
Estado de lanzamiento estable
Complex map - marker, article link and image.jpg
Implementación Etiqueta
Descripción Permite agregar mapas a páginas como frontend de servicios de mapeo
Autor(es) Yuri Astrakhan (yurikdiscusión)
MediaWiki 1.36+
PHP 7.2
Cambios de la base de datos No
Licencia MIT Licencia
Descarga
Ayuda Help:Extension:Kartographer/es
Ejemplo Ve abajo en esta página
  • $wgKartographerSimpleStyleMarkers
  • $wgKartographerSrcsetScales
  • $wgKartographerStyles
  • $wgKartographerUsePageLanguage
  • $wgKartographerFallbackZoom
  • $wgKartographerStaticMapframe
  • $wgKartographerDfltStyle
  • $wgKartographerVersionedStaticMaps
  • $wgKartographerEnableMapFrame
  • $wgKartographerMapServer
  • $wgKartographerWikivoyageMode
  • $wgKartographerVersionedLiveMaps
  • $wgKartographerUseMarkerStyle
  • $wgKartographerVersionedMapdata
  • $wgKartographerNearby
* mapframe
  • maplink
Traduce el Kartographer extensión si es disponible en translatewiki.net

Verificar uso y versión de la matriz.

Asuntos Tareas abiertas · Reportar un bug

La extensión Kartographer permite mostrar mapas (basados en OpenStreetMap) en páginas wiki. Fue específicamente diseñado para funcionar en sitios de Wikimedia como Wikivoyage y Wikipedia, aunque puede ser usado en cualquier wiki.

El servidor tile ubicado en maps.wikimedia.org no está disponible para terceros. Por favor utiliza tu propio servidor tile. If you are a Wikimedia affiliate, see wikitech:Maps/External usage instead.

Uso

Kartographer define las etiquetas de wikitexto ‎<mapframe>...‎</mapframe> y ‎<maplink>, que muestran un mapa y un enlace a un mapa en la página respectivamente. Revisa Ayuda:Extensión:Kartographer para saber cómo llamar aquellas etiquetas.

Ejemplo

 
Map of London


Instalación

  • Instala la instalación JsonConfig como se describe en su documentación que es requerida para ejecutar esta extensión.
  • Descarga y extrae los archivos en un directorio denominado «Kartographer» dentro de la carpeta extensions/.
  • Cuando se efectúa la instalación desde Git, hay que ejecutar Composer para que se instalen las dependencias de PHP; para este efecto, ejecute composer install --no-dev en el directorio de la extensión. (ver task T173141 para complicaciones potenciales)
  • Añade el código siguiente al final de LocalSettings.php :
    wfLoadExtension( 'Kartographer' );
    
  • Configurar como sea necesario.
  •   Hecho – Navega a Special:Version en el wiki para verificar que la extensión se haya instalado correctamente.

Para quienes usan MediaWiki 1.24 o versiones anteriores:

Estas instrucciones describen la nueva forma de instalar extensiones usando wfLoadExtension(). Si necesitas instalar esta extensión en versiones anteriores (MediaWiki 1.24 y anteriores), debes usar lo siguiente en lugar de wfLoadExtension( 'Kartographer' );:

require_once "$IP/extensions/Kartographer/Kartographer.php";

Configuración

Preferencias de configuración
parámetro por defecto comentario
$wgKartographerMapServer
null
Server providing the map tiles. This is the only setting that doesn't have a default. You must provide a value. Note that the Wikimedia tile server https://maps.wikimedia.org can't be used outside of the Wikimedia cluster. See openstreetmap:Tile servers for tile servers.
$wgKartographerStyles
["osm-intl", "osm"]
Available map styles users can request from your $wgKartographerMapServer via mapstyle="…".
$wgKartographerDfltStyle
"osm-intl"
Default map style to be used. Must be one of the values from $wgKartographerStyles.
$wgKartographerSrcsetScales
[ 1.3, 1.5, 2, 2.6, 3 ]
Set of allowed high-DPI pixelratios supported by your $wgKartographerMapServer, to be used in <img srcset="…"> and $wgKartographerMapServer URLs. Must be in incremental order. Doesn't need to start with 1, this happens automatically. Note that most tile servers don't support this at all and thus require setting this to an empty array.
$wgKartographerUseMarkerStyle
false
Allows Kartographer to extract marker styles from the GeoJSON to style a ‎<maplink> accordingly. Currently only the marker-color is considered.
$wgKartographerWikivoyageMode
false
Enables the group feature where different ‎<maplink> and ‎<mapframe> tags can access each others data via group="…" and show="…" attributes. See Help:Extension:Kartographer#Groups. Disabled by default. Meant to be enabled on Wikivoyage.
$wgKartographerStaticMapframe
false
Disables the module that turns ‎<mapframe> tags into interactive mini-maps that can be panned and zoomed without leaving the page. Static maps are recommended on high-traffic wikis where your KartographerMapServer couldn't keep up. Clicking ‎<maplink> and ‎<mapframe> tags to open a fullscreen interactive map is always possible. Requires a static map renderer like Kartotherian and $wgKartographerEnableMapFrame to be true.
$wgKartographerEnableMapFrame
true
Enables the ‎<mapframe> tag to embed mini-maps directly into pages. The ‎<maplink> tag is always enabled.
$wgKartographerUsePageLanguage
true
Use the language of the page instead of that of the language of the territory mapped. This sets the lang parameter of the tiles requested.
$wgKartographerFallbackZoom
13
Fallback zoom value when no zoom="…" is given. Must be an integer between 0 (map shows the entire earth) and 19 (as close as possible). Currently only works with dynamic maps.

API

This extension provides two internal APIs.

Implementation

Kartographer makes use of a suite of open-source, open-data tools for displaying maps:

  • On the client side (within the browser):
    • Leaflet, a JavaScript mapping library
  • On the server side:
    • Kartotherian, a map tile service developed by the Wikimedia Foundation, which itself contains code from Mapbox. Third party installations should use non-Wikimedia tile servers listed on openstreetmap:Tile servers
      • Example, for maps from "wmflabs Hike & Bike" with this setting in LocalSettings.php
$wgKartographerMapServer = 'https://tiles.wmflabs.org';
$wgKartographerDfltStyle = 'hikebike';
$wgKartographerSrcsetScales = []; /* Because no support for HiDPI tiles */
  • Generating the data in advance:
    • Tilerator, a tile pre-generation service also developed by the Wikimedia Foundation
    • OpenStreetMap, an open map data source, the source for the map data as well as for most of the points of interest (POIs).

For more information on these, see Maps#Production maps cluster. For more information on the production aspects of running these services, see the Wikitech Maps page.

Goals

General goals

  • A simple method to insert a map into an article without requiring common.js code changes
  • Ability to add extra information (marks, area, popups, text, links) to the map
  • Ability to gather map usage statistics (KPI) to better gauge how and what should be improved.
  • TBD: experimentation - if the user is aware of the privacy implications, the map should be able to show external data from non-production source, e.g. wmflabs. Static, server-side rendered images will not include the extra data added via this method until the extra data source is hosted in the secure production environment and can be shown without the user action.

Wikivoyage goals

Wikivoyage tends to have a large number of points of interest (POIs), such as museums and restaurants, listed on a page (see example and scroll down to the "See" section). Each POI is usually added with a template, but all of them should appear on the same map. Also, each POI should be referable by showing an icon with a number, both in the text of the article, and on the map:

  • Ability to incrementally add features to the map. For example, each usage of the restaurant template adds a single POI, and the map shows all of them.
  • Added features need to be indexable. E.g. the first restaurant template would show [1] on the page, and map would show POI as a clickable [1] element. There could be multiple index counters at the same time, each for its own type of POIs.

Known problems

See the corresponding project(s) in Phabricator for a complete list of bugs.