Last modified on December 15, 2011, at 19:48

Google Maps 0.7.x

Google Maps 0.7.x
What:
A web mapping service application and technology provided by Google, free for non-commercial uses.
Licence:
Google Maps 0.7.x licence
Parameter value:
googlemaps2
Parameter aliases:
googlemaps, googlemap, google, gmap, gmaps
More info:
Google Maps 0.7.x

Google Maps 0.7.x is one of the mapping services natively supported by the Maps and Semantic Maps extensions. It can be used with:

Google Maps 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 Changed in 0.3
types map-types, map types configurable Added in 0.3
type map-type, map type configurable -
overlays - configurable Added in 0.4.2
autozoom auto zoom, mouse zoom, mousezoom configurable -
kml - none Added in 0.6.4

Controls

Parameter: controls=

Possible values: auto,large, small, large-original, small-original, zoom, type, type-menu, overview-map, scale, nav-label, overlays

This parameter determines the controls that will be placed on your Google Maps map, and determine how the user will be able to interact with the map. Values are separated with comma's. You can set the default in the settings file.

Example:

controls=small, nav-label, overview-map, scale

Note that some combinations are not possible, for example type and type-menu.

Types

Maps displaying a pop-up on a Google maps map with multiple map types.

Parameter: types=

Possible values: normal, satellite, hybrid, physical, earth, sky, moon, moon-elevation, mars, mars-elevation, mars-infrared

The map types the user will be able to choose in the map type selector control. Values are separated with comma's. You can set the default.

Example:

types=hybrid,satellite,earth,physical

Maps allowed to also use the associated Google Maps API map type names. However, this support has been removed in 0.5.

Type

Maps displaying a Google Sky map with multiple markers and overview map.

Parameter: type=

Possible values: See types.

The map type, in other words: the one the map will show when the page is loaded. You can set the default.

Example:

type=hybrid

Overlays

Parameter: overlays=

Possible values: wikipedia, photos, webcams, videos

A comma separated list of values indicating which overlays a user should be able to choose from. If you do not provide any values, the defaults will be used. To not show any overlays, simply do not pas along the 'overlay' control for the 'controls=' parameter. Each overlay can be shown at page load by adding a '-1' to the end of it's value. You can set the default.

Example:

overlays=wikipedia-1,webcams,photos-1

Autozoom

Parameter: autozoom=

Possible values: on, off

This value determines whether you will be able to zoom in and out using your the scroll wheel of your mouse. You can set the default.

Example:

autozoom=off


Maps displaying a Google Earth map with Wikipedia and Images overlays.

Google Maps specific settings

Google Maps API Key

Your Google Maps API key. Required for displaying Google Maps, and using the Google Geocoder services. Haven't got an API key yet? Get it here.

Default: $egGoogleMapsKey = "";

When you have multiple domain names pointing to the same wiki, or it can be accessed both via http and https, you'll need to obtain multiple Google Maps API keys. You can then assign the setting based on what domain and protocol the wiki is being accessed from. This is an example of such code taken from the 0x20 wiki which handles two different domains, and for the first one both http and https:

if ( $_SERVER["HTTP_HOST"] == '0x20.be' ) {
        $egGoogleMapsKey = $_SERVER['HTTPS'] == 'on' ? 'ABQIAAAAdYD9wX5nn5ieSE0ANt5GxBS1dvlOHkhLpDU5_2ZHizy7POYzHRR5LaVp10iVJaW2krSfQOOpZz8zlA' : 'ABQIAAAAdYD9wX5nn5ieSE0ANt5GxBRVSxrY0pWd3o5sbcnAa1IPqJGv0RQdiL0pe0Q4XsWFUQe-cjb9ENLHpg';
} else { // hackerspace.be key
        $egGoogleMapsKey = 'ABQIAAAA3AOzHeODFC1EU5j0rU7-PhSW0d2lrJqHCo-iKf1CMXU4yaVyLRSxCPcEQltV8R_4KwMiak7ZD1YtAg';
}

Default map zoom

The default zoom of a Google Maps map. This value will only be used when the user does not provide one.

Default: $egMapsGoogleMapsZoom = 14;

Default map types

The default Google Maps map types. This are the map types the user will be able to choose in the map type selector control. This value will only be used when the user does not provide one.

Default: $egMapsGoogleMapsTypes = array('normal', 'satellite', 'hybrid', 'physical');

Default map type

The default map type, in other words: the one the map will show when the page is loaded. This value will only be used when the user does not provide one.

Default: $egMapsGoogleMapsType = 'normal';

Default map controls

The default controls for Google Maps. This value will only be used when the user does not provide one.

Default: $egMapsGMapControls = array('auto', 'scale', 'type', 'overlays');

Default overlays

The default overlays for Google Maps, and whether they should be shown at page-load. This value will only be used when the user does not provide one.

Default: $egMapsGMapOverlays = array('photos' => false, 'videos' => false, 'wikipedia' => false, 'webcams' => false);

Default autozoom

The default value for enabling or disabling the autozoom of a map. This value will only be used when the user does not provide one.

Default: $egMapsGoogleAutozoom = true;

Map name prefix

The Google Maps 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: $egMapsGoogleMapsPrefix = 'map_google';

Google Maps usage examples

If you are using Maps and have a great example of Google Maps functionality, feel free to link to it below.

This documentation page applies to all (Semantic) Maps versions from 0.7 to 0.7.x.
Other versions: 1.0 – 1.0.5, 0.1 – 0.6.6      

Google Maps v2 en 0.7 0.7.x