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

thydzik 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;

thydzikgooglemap(example.xml)

For the more adventurous;

thydzikgooglemap(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 thydzikgooglemap options will be used.
  • height is the optional height parameter, if left out the default height defined in the thydzikgooglemap 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. thydzikgooglemap(example.xml), thydzikgooglemap will produce a default styled map;

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

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

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

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

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