Google Map v2.0 released – rewritten code supporting API v3 and gpx downloads!

Google Map v2.0 has now been released.
Rewritten code supporting latest WordPress and Google Map API v3 features.

Allow your readers to downloads your maps to GPS via GPX files. Give your readers the exact coordinates to your location.

Download from the WordPress plugin repository.

The following examples use the included example.xml file.


<!-- Marker Z has no html to show nonclickability-->

<!-- Standard marker with html-->

<!-- Character marker with html that includes link-->

<!-- Example of two lines-->

  • Marker Z – no HTML, nonclickable.
  • Marker 1 – standard maker with some text.
  • Marker Default – no icon defaults to standard Google Maps marker.
  • Marker $ – symbols can even be displayed on a marker and links in the HTML.
  • Marker KP – up to two characters can be displayed.

To display a map, simply type;

tgooglemap(example.xml)

For the more adventurous;

tgooglemap(example.xml, width, height, zoom, maptype)

where;

  • example.xml is your xml file, and example xml file is included with thdyzikGoogleMap in the plugin directory.
  • width is the optional width parameter, if left out the default width defined in the tgooglemap options will be used.
  • height is the optional height parameter, if left out the default height defined in the tgm options will be used.
  • zoom is the optional zoom level from 0 to 17 (0 being the furthest away), if left out zoom will be calculated automatically to fit all points.
  • maptype is the optional map type parameters, which can be (Normal, G_NORMAL_MAP, N), (SATELLITE, G_SATELLITE_MAP, S), (HYBRID, G_HYBRID_MAP, H), (PHYSICAL, G_PHYSICAL_MAP, P, TERRAIN or T) if left out Normal is defined.

Normal, G_NORMAL_MAP, N or left out; i.e. tgm(example.xml), tgm will produce a default styled map;

tgm(example.xml)

SATELLITE, G_SATELLITE_MAP, S; i.e. tgm(example.xml, 4, S), tgm will produce a satellite styled map. Note I have included a zoom of 4, and used the abreviation ‘S’;

tgm(example.xml, 4, S)

HYBRID, G_HYBRID_MAP, H; i.e. tgm(example.xml,hYbRiD,450,225), tgm will produce a hybrid styled map. Note I have included a width and height, and proved that capitalisation is not of concern;

tgm(example.xml, hYbRiD, 450,225)

PHYSICAL, G_PHYSICAL_MAP, P, TERRAIN or T; i.e tgm(example.xml,TERRAIN), tgm will produce a terrain styled map;

tgm(example.xml,TERRAIN)

Reading XML from different folder
The XML can be in any location, as long as the whole path is specified i.e. tgm(https://mectile.com/geocaching/karratha-mar08/karratha-mar08.xml). Yes, even links in the marker text are preserved.

tgooglemap(https://mectile.com/geocaching/karratha-mar08/karratha-mar08.xml)

Reading XML from different domain
The XML can even be on a different domain, as long as the whole path is specified. i.e. tgm(http://xxxxxx.com/maps/our-nullarbor-adventure-clare-melbourne08.xml).

tgooglemap(http://xxxxxx.com/maps/our-nullarbor-adventure-clare-melbourne08.xml)


Posted

in

,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *