Help:Configuration

From Mapping on MediaWiki
Revision as of 08:15, July 3, 2012 by Krabina (Talk | contribs)$7

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Admin manual

Download

Installation

Configuration

Troubleshooting

User manual

This page explains how you can use various settings to tweak the display and behaviour or your maps and related features. The settings are grouped by extension. You can modify a setting by copying its code from its extension settings file and placing it with the adapted value in LocalSettings.php, after the inclusion of the extension. The settings file of each extension should contain a rough copy of the documentation found here. This list contains the common settings (the ones that affect all mapping services). For the service specific settings, see the relevant mapping service.


Maps settings

The following settings relate to non-mapping-service-specific features provided by Maps.

Mapping services

Parameter Description
$egMapsAvailableServices The mapping services that should be available. By default this will be all the supported ones, so this setting can be used to limit which ones are available to the user.

Default:

array(
    'googlemaps2',
    'googlemaps3',
    'yahoomaps',
    'openlayers'
    'osm'
)
$egMapsDefaultService The default mapping service to use when displaying maps. See the mapping services page for a list of the available values. It should be one of the values in $egMapsAvailableServices.

Default: 'googlemaps2'

$egMapsDefaultServices['display_map'] The default mapping service to use with the display map parser hook.

Default: egMapsDefaultService

$egMapsDefaultServices['display_point'] The default mapping service to use with the display points parser hook.

Default: egMapsDefaultService

Coordinates

Parameter Description
$egMapsAvailableCoordNotations The coordinate notations that should be available. By default this will be all the supported notations, so this setting can be used to limit what formats can be used.

Default:

array( 
    Maps_COORDS_FLOAT,
    Maps_COORDS_DMS,
    Maps_COORDS_DM,
    Maps_COORDS_DD
); 
$egMapsCoordinateNotation The default output format of coordinates. It should be one of the values in $egMapsAvailableCoordNotations.

Default: Maps_COORDS_DMS

$egMapsCoordinateDirectional Boolean. Indicates if coordinates should be outputted in directional notation by default. Recommended to be true for Maps_COORDS_DMS and false for Maps_COORDS_FLOAT.

Default: true

$egMapsInternatDirectionLabels Boolean. Sets if direction labels should be translated to their equivalent in the wiki language or not.

Default: true

Geocoding

Parameter Description
$egMapsAvailableGeoServices Array containing all the geocoding services that will be made available to the user.

Default:

array(
    'geonames',
    'google',
    'yahoo'
);
$egMapsDefaultGeoService The default geocoding service. See the geocoding services page for a list of the available values.

Default: 'geonames'

$egMapsGeoNamesUser The geonames user name. See http://www.geonames.org/export/web-services.html page for instructions on how to obtain a user name.
$egMapsAllowCoordsGeocoding Boolean. Sets if coordinates should be allowed in geocoding calls. This mainly applies to the geocode parser hook.

Default: true

$egMapsEnableGeoCache Boolean. Sets if geocoded addresses should be stored in a cache. This prevents duplicate requests from being made in a single PHP session, at the cost of some additional memory usage.

Default: true

$egMapsUserGeoOverrides Boolean. Indicates if geocoders can override the default geoservice based on the used mapping service.

Default: true

Map dimensions

Parameter Description
$egMapsMapWidth The default width for maps. This value can be expressed in %, px and em. When no unit is provided, px will be assumed.

Default: '100%'

$egMapsMapHeight The default height for maps. This value can be expressed in %, px and em. When no unit is provided, px will be assumed.

Default: '350px'

$egMapsSizeRestrictions The minimum and maximum width and height for all maps. First min, then max. Min needs to be smaller then max. When the height or width exceed their limits, they will be changed to the closest allowed value.

Default:

$egMapsSizeRestrictions = array(
    'width'  => array( 50, 1020, 1, 100 ),
    'height' => array( 90, 1000, 1, 100 ),
);

Map centre

Parameter Description
$egMapsDefaultMapCentre The default centre for maps. Can be either a set of coordinates or an address. Make sure this value is valid, if it's not, an exception will be thrown when Maps tries to use it. Therefore you are recommended to use a set of coordinates, and not an address.

Default: '0, 0'

Markers

Parameter Description
$egMapsDefaultTitle The default title for all markers. If set, it will be visible as text or title in a pop-up when the user clicks a marker. Leave empty for no title.

Default: ''

$egMapsDefaultLabel The default label for all markers. If set, it will be visible as text in a pop-up when the user clicks a marker. Leave empty for no label.

Default: ''

Distance

Parameter Description
$egMapsDistanceUnit The default unit for distances.

Default: 'm'

$egMapsDistanceDecimals The default amount of fractal digits in a distance.

Default: 2

$egMapsDistanceUnits A list of units (keys) and how many meters they represent (value). No spaces! If the unit consists out of multiple words, just write them together.

Default:

$egMapsDistanceUnits = array(
    'm' => 1,
    'meter' => 1,
    'meters' => 1,
    'km' => 1000,
    'kilometers' => 1000,
    'kilometres' => 1000,
    'mi' => 1609.344,
    'mile' => 1609.344,
    'miles' => 1609.344,
    'nm' => 1852,
    'nauticalmile' => 1852,
    'nauticalmiles' => 1852,
);

Semantic Maps settings

The following settings relate to non-mapping-service-specific features provided by Semantic Maps.

Mapping services

Parameter Description
$egMapsDefaultServices['qp'] The default mapping service to use for maps showing query results.

Default: egMapsDefaultService

$egMapsDefaultServices['fi'] The default mapping service to use for form input maps.

Default: egMapsDefaultService

Queries

Parameter Description
$smgQPForceShow Boolean. The default value for the forceshow parameter. Will force a map to be shown even when there are no query results when set to true.

Default: false

$smgQPShowTitle Boolean. The default value for the showtitle parameter. Will hide the title in the marker pop-ups when set to true.

Default: true

$smgQPTemplate Boolean. Allows you to define the content and it's layout of marker pop-ups via a template.

Default: false

$smgQPCoodFormat The default coordinates notation. This can be any of the allowed notations.

Default: $egMapsCoordinateNotation

$$smgQPCoodDirectional Boolean. The default coordinates notation.

Default: $egMapsCoordinateDirectional

Forms

Parameter Description
$smgFIWidth The default width of maps in form inputs. This setting allows for having a different default in form inputs then for the other maps.

Default: 665

$smgFIHeight The default height of maps in form inputs. This setting allows for having a different default in form inputs then for the other maps.

Default: $egMapsMapHeight

Mapping service settings

The settings related to mapping-service-specific features can be found on these pages:

TODO: create a list (with query) to individual pages for each service

This documentation page applies to all (Semantic) Maps versions from 0.7 to the most current version.
Other versions: 0.6 – 0.6.6      

Help:Configuration en 0.7