thydzikGoogleMap v1.4.5 – an inline Google map plugin for WordPress

thydzikGoogleMap v1.4.5 is now available with significant improvements, including

  • The Google Maps Javascript and thydzikGoogleMap Javascript is downloaded only as needed, speeding up page loading of all pages without maps.
  • Removal of <head> code means thydzikGoogleMap will only be present when called.
  • Compressed thydzikGoogleMap code.
  • Multiple maps can now be created in a single post!
  • Map type can be changed from default by providing an additional ‘map type’ parameter.

thydzikGoogleMap produces valid XHTML and allows for easy creation of Google Maps in your WordPress posts from XML map data.

Grab the latest from the WordPress repository.

Examples of the newest functionality below:

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

thydzikGoogleMap(example.xml)

Using either: 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’.

thydzikgooglemap(example.xml, 4, S)

Using either: 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.

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

Finally, using either: PHYSICAL, G_PHYSICAL_MAP, P, TERRAIN or T; i.e thydzikGoogleMap(example.xml,TERRAIN), thydzikGoogleMap will produce a terrain styled map.

thydzikGoogleMap(example.xml,TERRAIN)

As always, comments and suggestions welcome. In a future update I will try to incorporate rounded corners :)

  • This plugin just keeps getting better and better. Thank you.

  • Many thanks for appling my suggestion!
    and I also needed the ‘map type’.
    Thank you!

  • Hi

    thanks for your plug-in! I use it it already on some of my pages (it’s about cycling) and will use it on more pages soon!

    I found a small bug: when you have a XML file with polylines only (no markers), the variable “point” is not defined and that screws up the automatic zoom function. I could fix it by removing “bounds.extend(point);” in the section which processes the polylines.

    And… I also have a wish. Do you think it’s possible to add a parser for encoded polylines? For example, if you would have something like this in the XML file:

    I don’t know if the contents of the XML file are standardized and if that is possible at all. But, I think it would increase the speed of drawing longer polylines into a map.

    Greetings!
    Alexander

  • thydzik

    Hi Alex

    Thanks for the bug report, it has been fixed with version 1.4.5.1.

    Please explain your parser idea, I think your example was removed.

    Travis

  • Hi

    that was very quick fix!

    Here is my example again (a bit modified). I hope it goes through this time:

    colour=”#3333cc”
    width=”4″
    encodedPoints=”sq|fGhmpaNqBhRoeCyF”
    encodedLevels=”BBBBBBBBBBBBBBBB”

    The idea is to have a section in the XML file with the values for EncodedPoints and EncodedLevels.

    Here is a page with some information about encoding polylines: http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/index.html
    There is also a tool on this page which encodes KML or NMEA files from the GPS logger.

    Greetings!
    Alexander

  • thydzik

    Hi Alexander

    Thanks for the info, I did not know about Encoded Polylines.
    It is an interesting concept.

    I will look into it. At the moment I want my plugin to handle gpx files, using Encoded Polylines has the advantage of smart line drawing, I might be able to incorporate both.

    Travis

  • Sounds good! Thank you!

  • charismeki

    hi travis,

    any clue why the markers dont show up? nice pluign btw. the map appears on my webpage. i am using the example.xml which is located in the thydzikGoogleMap folder

    thx and best

  • thydzik

    charismeki,

    can you provide a like to your site with the example?

    do you have the marker directory copied and uploaded?

  • Michalis

    Is it possible to use an .klm file from google maps? So, if I update a personal map from “My Maps”, then it is not necessary to download and then upload the file again.

  • thydzik

    klm files are currently not supported, only xml files at the moment.

  • Paul

    Hi, I’m trying to use your Google Map plugin with my experimental WordPress website and receive the following message:

    The Google Maps API key used on this web site was registered for a different web site. You can generate a new key for this web site at http://code.google.com/apis/maps/.

    I already have an API key for this domain but I’ve tried different URL settings for the API key but they all result in the same message. What am I doing wrong?

    Thank you
    Paul

  • Paul

    Hello again, Since that last message I’ve discovered that I am unable to successfully use any map utilities and the one plugin I did get to work had problems with display. I changed the theme and there seems to be no problem. The theme that gave me the problem was Atahualpa and although it is a superb and flexible theme, I suspect it doesn’t work well with some plugins so I shall reserve it for a less demanding application.
    Thank you again for an excellent plugin.
    Paul

  • thydzik

    Paul, Glad to hear you have found the problem. Let me know if you run into any other issues.