Difference between revisions of "Template:Maps installation"

From Mapping on MediaWiki
Jump to: navigation, search
m (Maps installation)
m (rewrote slightly for clarity)
Line 1: Line 1:
 
{{navbar|Maps installation|mini=y}}
 
{{navbar|Maps installation|mini=y}}
In order to use Maps, you need to have [http://www.mediawiki.org/wiki/Extension:Validator Validator] installed. If you get a distribution from this page, you don't need to bother this, since Validator comes bundled with every release, and will automatically be loaded by Maps. If you get Maps from SVN trunk, or a tag, you must make sure you also [http://www.mediawiki.org/wiki/Extension:Validator#Download get Validator].
+
In order to use Maps, you need to have [http://www.mediawiki.org/wiki/Extension:Validator Extension:Validator] installed.  
 +
 
 +
But if you get a distribution from this page, you do not need to bother with this, since Validator comes bundled with every release, and will automatically be loaded by Maps. If you get Maps from SVN trunk, or a tag, you must make sure you also [http://www.mediawiki.org/wiki/Extension:Validator#Download install Validator].
  
 
Once you have downloaded the code, place the 'Maps' directory within your MediaWiki 'extensions' directory. Then add the following code to your [http://www.mediawiki.org/wiki/Manual:LocalSettings.php LocalSettings.php] file:
 
Once you have downloaded the code, place the 'Maps' directory within your MediaWiki 'extensions' directory. Then add the following code to your [http://www.mediawiki.org/wiki/Manual:LocalSettings.php LocalSettings.php] file:
  
 
<source lang="php">
 
<source lang="php">
# Maps
+
require_once( "$IP/extensions/Maps/Maps.php" ); # Maps
require_once( "$IP/extensions/Maps/Maps.php" );
+
 
</source>
 
</source>
  

Revision as of 18:05, November 28, 2011

In order to use Maps, you need to have Extension:Validator installed.

But if you get a distribution from this page, you do not need to bother with this, since Validator comes bundled with every release, and will automatically be loaded by Maps. If you get Maps from SVN trunk, or a tag, you must make sure you also install Validator.

Once you have downloaded the code, place the 'Maps' directory within your MediaWiki 'extensions' directory. Then add the following code to your LocalSettings.php file:

require_once( "$IP/extensions/Maps/Maps.php" ); # Maps

For using Google Maps or Yahoo! Maps, you must enter their API keys. You need to add them in LocalSettings.php, after the inclusion of Maps.

# API keys configuration
$egGoogleMapsKey = ""; # Your Google Maps API key. Required for displaying Google Maps, and using the Google Geocoder services.
$egYahooMapsKey = ""; # Your Yahoo! Maps API key. Required for displaying Yahoo! Maps.

If you don't already have them, you can obtain them at the Google Maps API page and Yahoo Maps API page. Note that the Google Maps API key is required for both displaying maps AND for geocoding (and therefore also required when you use display_address with a Yahoo! Map). Also note that use of the Google Maps API is free only if your site is accessible to the public; otherwise it costs money - read the Google Maps terms of service for further details.

Once you have successfully installed Maps, please add your wiki to the Sites that use Maps section.