Google Maps Plugin for Google Maps API Version 3

Compatible with DokuWiki
Hogfather+
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Similar to googlemap3, googlemaps, maplink, openlayersmap
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
There are a number of different maps and google maps plugins available, all of which are outdated or limited in their usage, so I wrote a new one which can easily be extended should you miss a feature. This was originally based on Christopher Smith's googlemaps plugin, but with a complete overhaul, additional features, and changes in syntax.
You need to have a Google Maps API key to use this plugin (see Configuration and Settings)
See the plugin in action here, created with the following syntax:
<googlemaps3 address="hua hin beach" zoom="9"> address,hua hin beach,Hua Hin Beach,beach.png,Hua Hin Beach with Hilton Hotel,Directions,_media/google:hua_hin_beach.jpg </googlemaps3>
The same can be achieved with:
<googlemaps3 lat="12.57076" lng="99.96260" zoom="9"> 12.57076,99.96260,Hua Hin Beach,beach.png,Hua Hin Beach with Hilton Hotel,Directions,_media/google:hua_hin_beach.jpg </googlemaps3>
<googlemaps3 lat="12.57076" lng="99.96260" zoom="9" [option="setting"]> [marker1] [marker2] [...] [markerN] </googlemaps3>
Option | Setting | Default | Default set in |
---|---|---|---|
lat | Latitude of map center | 12.57076 | Plugin1 |
lng | Longitude of map center | 99.96260 | Plugin1 |
address | Google Maps location address3 | Plugin1 | |
zoom | Initial zoom level of map | 0 | Plugin1 |
type | Google Map Type5 | roadmap | API2 |
width | Width of map | 100% | style.css |
height | Heigth of map | 500px (must be fixed height) | style.css |
language | Language of user interface | en | API24 |
region | Region Bias6 | US | API24 |
disableDefaultUI | Disable all map controls | 0 (false) | API2 |
zoomControl | Enable zoom control | 1 (true) | API2 |
mapTypeControl | Enable map type control | 1 (true) | API2 |
scaleControl | Enable scale control | 1 (true) | API2 |
streetViewControl | Enable street view control | 1 (true) | API2 |
rotateControl | Enable rotate control | 1 (true) | API2 |
fullscreenControl | Enable fullscreen control | 1 (true) | API2 |
kml | Add KML or GeoRSS layer7 | off | Plugin1 |
lat, lng, title, icon, info, dir, img, width
Option | Setting | Default | Shows as/in |
---|---|---|---|
lat | Latitude of marker1 | 0 | Marker |
lng | Longitude of marker1 | 0 | Marker |
title | Title of marker2 | Hover, Popup | |
icon | Custom icon as image file or svg path3 | Marker | |
info | Info text4 | Popup | |
dir | Directions link text5 | Popup | |
img | Image URL6 | Popup | |
width | Width of popup7 | 200px | Popup |
address,hua hin beach,Hua Hin Beach,,Hua Hin Beach with Hilton Hotel
https://your.wiki.domain/lib/plugins/googlemaps3/icons/icons.php
The following options set the plugin's behavior for your site unless overriden per map or page.
Option | Purpose | Default | Override possible |
---|---|---|---|
key | Google Map API key | no | |
region | Region Code Biasing | US (Google Maps API) | per page |
language | Language of Google Maps UI | Browser language (Google Maps API) | per page |
path | Path to customized icons | lib/plugins/googlemaps3/icons/ | yes, if empty1 |
delim | Delimiter used for markers2 | , | no |
Default plugin style sheet:
/* maps */ .googlemaps3 { width: 100%; height: 500px; } /* marker popup */ .googlemaps3.markerinfo { width: 200px; height: auto; }
#googlemaps3map2 { height: 400px; } #googlemaps3marker4 { width: 300px; }