Module:CarouselMap/doc
This is a documentation subpage for Module:CarouselMap. It contains usage information, categories and other content or metadata that is not part of the original module page. |
This is a documentation subpage for Module:CarouselMap. It contains usage information, categories and other content or metadata that is not part of the original module page. |
This module inserts an interactive map that cycles daily among locations specified in a configuration module.
Configuration
Each of the functions below relies on a subpage of Module:CarouselMap to determine the map's contents on a given day. Each subpage is a Lua module that returns a table of places specifying the map's parameters. When embedding a carousel in a new article, create a corresponding configuration module based on an existing module (as well as a /doc page containing any relevant documentation):
slippymap
Inserts an interactive Leaflet map based on the given configuration module. Appropriate for raster tile layers.
Parameters:
- |1 =
- The configuration module's subpage name. Defaults to the current page's subpage name.
- |height =
- The map's height in pixels.
- |width =
- The map's width in pixels, or |width = full to fill the available space.
vectormap
Inserts an interactive MapLibre GL map based on the given configuration module. Similar to slippymap
, but with support for rendering vector tiles on the client side. Displays an interactive comparison between two maps if either |layer2 = or |date2 = is specified.
Parameters:
- |1 =
- The configuration module's subpage name. Defaults to the current page's subpage name.
- |height =
- The map's height in pixels.
- |width =
- The map's width in pixels, or |width = full to fill the available space.
- |layer2 =
- The layer ID on the right-hand side of the map comparison, overriding the
layer
field in the configuration. - |date2 =
- The ISO 8601-1 date to filter the right-hand side of the map comparison, overriding the
date
field in the configuration.
description
Inserts the description
field of the configuration.
Parameters:
- |1 =
- The configuration module's subpage name. Defaults to the current page's subpage name.
externalURL
Inserts a URL to the full version of the embedded map.
Parameters:
- |1 =
- The configuration module's subpage name. Defaults to the current page's subpage name.
- |site =
- The ID of the website to link to.
See also