Changes for page Map Macro

Last modified by Ilie Andriuta on 2020/08/10 00:34

From version < 68.2 >
edited by Admin
on 2015/10/16 00:13
To version < 69.1 >
edited by Gabriela Smeria
on 2015/10/19 12:33
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.Admin
1 +xwiki:XWiki.GabrielaSmeria
ExtensionCode.ExtensionCompatibilityClass[3]
cogMap Macro for XWiki
TypeXAR
Developed by

XWiki Development Team

Rating
Rate!
8 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager

Description

You will need connectivity back and forth from the wiki to Google servers for the macro to properly work. This might not be the case for a Intranet in a corporate environment for example.

Content

The content is mandatory and represents the location to map.

Parameters

NameMandatoryValuesDefaultDescription
locationYes*-Address of a place
widthNo[0-9]+ px500The width in pixels the map container will take
heightNo[0-9]+ px400The height in pixels the map container will take
zoomNo[0-9]+15 (which is about the size of a block of houses)The initial zoom the map will be focused at. Please refer to your provider API reference for intelligible values.
errorsnoshow / hideshowDisplay a popup with the returned status code when it is anything other than "OK"

Events

NameDescription
GMAPS:OKIndicates that no errors occurred; the address was successfully parsed and at least one geocode was returned
GMAPS:ZERO_RESULTSIndicates that the geocode was successful but returned no results. This may occur if the geocoder was passed a non-existent address.
GMAPS:OVER_QUERY_LIMITIndicates that you are over your quota.
GMAPS:REQUEST_DENIEDIndicates that your request was denied.
GMAPS:INVALID_REQUESTGenerally indicates that the query (address, components or latlng) is missing.
GMAPS:UNKNOWN_ERRORIndicates that the request could not be processed due to a server error. The request may succeed if you try again.

Examples

Map 1

Code:

{{map location="10, rue Pernety, France"}}{{/map}}

Result (as image):

map1.png

Map 2

Code:

{{map location="Rue des Thermopyles, 75014 Paris" width="400" height="300"}}A beautiful street in Paris{{/map}}

Result (as image):

map2.png

Map 3

Code:

{{map location="Le Louroux Beconnais, France" zoom="6"}}Where I grew up{{/map}}

Result (as image):

map3.png

Tested on

This extension has been tested with the following configurations.

Extension VersionXWiki FlavorNotes
1.1XWiki Enterprise 6.0.1
1.2XWiki Enterprise 5.4.6, 6.2.4, 6.3, 6.4-SNAPSHOT, 6.4.1

Tested both on colibri and flamingo.

1.2.2XWiki Enterprise 7.2
1.2.2XWiki Enterprise 7.2
 

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

Release Notes

v1.2.2

v1.2.1

v1.2

v1.1

  • Fixed wrong macro visibility (macro only worked for the Admin user)
  • Fixed "not an inline macro" errors in the macro description page
  • Bug: the Google Maps API is loaded more than once
  • Codestyle improvements, faster startup

v1.0

Initial release

Get Connected