Help:Configuration

From Mapping on MediaWiki
Revision as of 08:48, March 31, 2010 by Jeroen De Dauw (Talk | contribs)$7

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

Maps

Maps allows you to configure a variety of settings, and so affect how the extension works. All settings are located in Maps_Settings.php, in the root of the extension. You can modify a setting by copying its code and placing it with the adapted value in LocalSettings.php, after the inclusion of Maps. Here you have a list of the common settings (the ones that affect all mapping services). For the specific settings, see the map services. Note that the settings file is documented, and should provide you with sufficient information to understand the working of all settings.

Available mapping services

Array containing all the services that will be made available to the user.

Default: $egMapsAvailableServices = array('googlemaps', 'yahoomaps', 'openlayers', 'osm');

When not using a service, you might consider removing it's inclusion.

include_once $egMapsIP . '/GoogleMaps/Maps_GoogleMaps.php';     // Google Maps
include_once $egMapsIP . '/OpenLayers/Maps_OpenLayers.php';     // OpenLayers
include_once $egMapsIP . '/YahooMaps/Maps_YahooMaps.php';       // Yahoo! Maps
include_once $egMapsIP . '/OpenStreetMap/Maps_OSM.php';         // OpenLayers optimized for OSM

Doing this will cause Maps to completely ignore it, and so improve performance.

Default mapping service

The default mapping service for each feature, which will be used when no valid service is provided by the user. This service needs to be enabled, if not, the first one from the available services will be taken. Note: The default service needs to be available for the feature you set it for, since it's used as a fall-back mechanism.

Default: $egMapsDefaultServices = array('pf' => 'googlemaps');

This list contains all available features, and their feature code, which should be used as name in the $egMapsDefaultServices array.

  • pf - parser functions - This default will be used for all display_ parser functions.

An additional fall-back value is present, that will be used in case no default is specified for a certain feature. This service needs to be enabled, if not, the first one from the available services will be taken.

Default: $egMapsDefaultService = 'googlemaps';

Available mapping features

Array containing all the mapping features that will be made available to the user.

Default:

$egMapsAvailableFeatures['geocode'] = array(
                            'name' => 'Geocoding',
                            'class' => 'Geocoders',
                            'file' => 'Geocoders/Maps_Geocoders.php',
                            'local' => true,
                            );
 
$egMapsAvailableFeatures['pf'] = array(
                            'name' => 'Parser Functions',
                            'class' => 'MapsParserFunctions',
                            'file' => 'ParserFunctions/Maps_ParserFunctions.php',
                            'local' => true,
                            );

Removing an element will cause the corresponding feature to be unavailable.

Available geocoding services

Array containing all the geocoding services that will be made available to the user. The allowed values are 'yahoo', 'google' and 'geonames'.

Default geocoding service

The default geocoding service, which will be used when no service is provided by the user. This service needs to be enabled, if not, the first one from the available geocoding services will be taken.

Default: $egMapsDefaultGeoService = 'geonames';

Default map coordinates

The default coordinates of the marker. This value will only be used when the user does not provide one.

Default: $egMapsMapLat = '1'; $egMapsMapLon = '1';

Default map width

The default width of a map. These values will only be used when the user does not provide them.

Default: $egMapsMapWidth = 600;

Default map height

The default height of a map. These values will only be used when the user does not provide them.

Default: $egMapsMapHeight = 350;

Map size restrictions

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( 100, 1000 ),
	'height' => array( 100, 1000 ),
);

Default map zoom

The default zoom of a map. This value will only be used when the user does not provide one. Each service has it's own zoom setting. Please refer to the mapping services for more info.

Default map title

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.

Default: $egMapsDefaultTitle = '';

Default map label

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

Default: $egMapsDefaultLabel = '';


Semantic Maps

Semantic Maps allows you to configure a variety of settings, and so affect how the extension works. All settings are located in SM_Settings.php, in the root of the extension. You can modify a setting by copying it's code and placing it with the adapted value in LocalSettings.php, after the inclusion of Semantic Maps. Here you have a list of the common settings (the ones that affect all mapping services). For the specific settings, see the map services. Note that the settings file is documented, and should provide you with sufficient information to understand the working of all settings.

Since Semantic Maps extends Maps, most settings are actually part of Maps. If you want to change such settings, which include things like default map height and zoom level, review Maps settings.

Available mapping services

Semantic Maps adds data to this setting, but it belongs to Maps. See Maps available mapping services for more info.

Default:

include_once $smgIP . '/GoogleMaps/SM_GoogleMaps.php';     // Google Maps
include_once $smgIP . '/OpenLayers/SM_OpenLayers.php';     // OpenLayers
include_once $smgIP . '/YahooMaps/SM_YahooMaps.php';       // Yahoo! Maps
include_once $smgIP . '/OpenStreetMap/SM_OSM.php';         // OpenLayers optimized for OSM

When not using a service, you might consider removing it's inclusion. Doing this will cause Maps to completely ignore it for Semantic Maps features, and so improve performance.

Default mapping service

Semantic Maps adds data to this setting, but it belongs to Maps. See Maps default mapping service for more info.

Default:

$egMapsDefaultServices['qp'] = 'googlemaps';
$egMapsDefaultServices['fi'] = 'googlemaps';

This list contains all available features, and their feature identifier, which Semantic Maps should add to the $egMapsDefaultServices array.

  • qp - Query Printer - This default will be used for all semantic queries. Query printers handle semantic result formats.
  • fi - Form Input - This default will be used for all form input maps. Form inputs define Semantic Forms input types.

Available mapping features

Semantic Maps adds data to this setting, but it belongs to Maps. See Maps available mapping features for more info.

Default:

$egMapsAvailableFeatures['qp'] = array(
                            'name' => 'Query Printer',
                            'class' => 'SMQueryPrinters',
                            'file' => 'SemanticMaps/QueryPrinters/SM_QueryPrinters.php',
                            'local' => false
                            );
 
$egMapsAvailableFeatures['fi'] = array(
                            'name' => 'Form input',
                            'class' => 'SMFormInputs',
                            'file' => 'SemanticMaps/FormInputs/SM_FormInputs.php',
                            'local' => false
                            );