This little Macro gives the possibility to present an adress with a link to a Google map, actually presenting itself in a lightbox. THis requires the {include-lightbox} macro, or the lighbox code loaded via the Template.

Take a look at http://code.google.com/apis/maps/documentation/staticmaps/index.html#Addresses - It is very Easy to make more parameters in the Macro, giving more options.

Also, my macro requires the image, placed in the images folder under the Tomcat.

Update: I have eliminated the size and zomm hand hardcoded them, to make the macro as simple as possible to use

Name

me-map

Macro Body Processing

Render HTML

Output format

HTML

Usage

{me-map:size=800|zoom=14}Kærhavegårdvej 145, 9270 Klarup{me-map}

Code

## @param zoom:title=Zoom|type=string|required=true|desc=Zoom (10-20)
## @param size:title=Size|type=string|required=true|desc=Size (px)

$body <a id="single_image" href="http://maps.googleapis.com/maps/api/staticmap?center=$body&zoom=${paramzoom}&size=${paramsize}x${paramsize}&sensor=true&maptype=hybrid&markers=color:blue%7Clabel:$body|$body" rel="lightbox" title="Adresse: $body"><img src="/images/map_logo.jpg" border="0"></a>
  • Ingen etiketter