Contrib - Macros - Map Macro
Map Macro for XWiki |
Type | XAR |
Category | |
Developed by | |
Rating | |
License | GNU Lesser General Public License 2.1 |
Table of contents
Description
Content
The content is mandatory and represents the location to map.
Parameters
Name | Mandatory | Values | Default | Description |
---|---|---|---|---|
location | Yes | * | - | Address of a place |
width | No | [0-9]+ px | 500 | The width in pixels the map container will take |
height | No | [0-9]+ px | 400 | The height in pixels the map container will take |
zoom | No | [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. |
errors | no | show / hide | show | Display a popup with the returned status code when it is anything other than "OK" |
Events
Name | Description |
---|---|
GMAPS:OK | Indicates that no errors occurred; the address was successfully parsed and at least one geocode was returned |
GMAPS:ZERO_RESULTS | Indicates that the geocode was successful but returned no results. This may occur if the geocoder was passed a non-existent address. |
GMAPS:OVER_QUERY_LIMIT | Indicates that you are over your quota. |
GMAPS:REQUEST_DENIED | Indicates that your request was denied. |
GMAPS:INVALID_REQUEST | Generally indicates that the query (address, components or latlng) is missing. |
GMAPS:UNKNOWN_ERROR | Indicates that the request could not be processed due to a server error. The request may succeed if you try again. |
Examples
Map 1
Code:
Result (as image):
Map 2
Code:
Result (as image):
Map 3
Code:
Result (as image):
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:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- 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