OpenStreetMap
From Mapping on MediaWiki
OpenStreetMap is one of the mapping services natively supported by the Maps extension, and can be used in the display map and display point parser functions. It is also supported by Semantic Maps for both queries and form inputs. You can find examples on this page.
Contents |
[edit] Temporary removal in 0.6
The OpenStreetMap service has temporary been removed in 0.6.x, but will be re-added at some future point. Till then you can get OSM layers using the OpenLayers service with the osm layers.
[edit] OpenStreetMap specific properties
This mapping service defines several of it's own parameters that are supported by most of the features implementing this service.
| Property | Aliases | Default | Version |
|---|---|---|---|
| controls | - | configurable | Added in 0.4 |
| static | - | configurable | Added in 0.5 |
| activatable | - | configurable | Added in 0.5.1 |
| mode | - | osm-wm | Added in 0.5 |
[edit] Controls
Parameter: controls=
Available values: See the OpenLayers docs (the items in the menu on the left).
This parameter sets the controls that will be added to your OpenLayers map. You can add as many of the controls you want, by separating them with comma's. You can also configure the default controls (the ones that will be added when no value is provided) in the settings file.
See the OpenLayers docs for a list of available controls and their descriptions. Note that the value of the controls parameter is case insensitive, so it doesn't matter if you use capitals or only lower case letters.
Since 0.4, Maps supports the 'autopanzoom' control. When you specify this control, Maps will automatically determine if panzoom, panzoombar, or no control should be used, depending on the maps height.
Example of how to use this parameter:
controls=autopanzoom,scaleline,overviewmap,keyboarddefaults
[edit] Mode
Parameter: mode=
Available values: osm-wm, osm, satellite
The display mode for the map. It affects the static map data source. This parameter is only supported for display_map.
Example:
mode=osm
[edit] Static
Parameter: static=
Available values: yes, no, on, off
Indicates whether you want to get a static map (image) or not. For more info, see static map support. This parameter is only supported for display_map.
Example:
static=on
[edit] Activatable
Parameter: activatable=
Available values: yes, no, on, off
Indicates whether the user should be able to activate a static map. For more info, see static map support. This parameter is only supported for display_map.
Example:
activatable=off
[edit] OpenStreetMap specific settings
[edit] OpenStreetMap controls
The default controls for OpenStreetMap. This value will only be used when the user does not provide one. See the controls parameter for the available values.
Default: $egMapsOSMControls = array('layerswitcher', 'mouseposition', 'panzoombar', 'scaleline', 'navigation');
[edit] Default map zoom
The default zoom of an OpenStreetMap map. This value will only be used when the user does not provide one.
Default: $egMapsOSMZoom = 10;
[edit] Map name prefix
The OpenStreetMap map name prefix. It can not be identical to the one of another mapping service. Unless you know what you are doing, it's discouraged to modify this value.
Default: $egMapsOSMPrefix = 'map_osm';
OpenStreetMap

