Posting tracks on WordPress
[flexiblemap src=”http://wa01.navionicsmobile.com:8080/up/up//1401730734499Marker/newdoc.kml”]
This is the proposed route for our first day of our upcoming trip. Be sure to follow along at Sailing 2014. I am using it here to test Navionics’ shared KML files.
Navionics, KMZ and KML files
In the past I have used the tracking feature for the Navionics chartplotter app to track our sailing trips and, when I got home, uploaded the KMZ tracks to Google Maps My Maps and then cross-posted them back to the blog entries via an iframe. A) this is a lot of work and B) it was necessarily done after the fact and not when most of the readership was actually reading the entries. So I set out to find a better solution for our upcoming trip.
Another interesting note is the new Google Custom Maps doesn’t support KMZ uploads and so you have to go back to the ‘Classic’ maps to do so. And who knows how long that will last. Sometimes ‘upgrades’ are really annoying.
Anyway I tried a whole bunch of plugins but the the two most likely (WP Google Maps and XML Google Maps) were either for pay or not currently working with the latest versions of WordPress. I don’t mind paying for good functionality, but the $20 seemed a bit steep when I didn’t want to use 95% of the features I was paying for and there was no guarantee that it would do exactly what I wanted.
I finally came across WP Flexible Map and WP Flexible Map Options which allowed me to link to a KML file and have it displayed on my post with the desired parameters. The Options plugin just allows mw to set the parameters globally rather than having to include them in the shortcode. To call the KML file you simply include the shortcode [flexiblemap src=”http://source url”]
This however presented a few problems. First I had to upload the KML file to an accessible server. I tested it using a folder on macblaze.ca and it worked ok (with a few provisos—see point 2) but since I was not planning on having a laptop this meant I would have to figure out a way to ftp the files from an email attachment using my iPhone. It was starting to verge on too many steps with way too many issues.
Second, the Flexible Map didn’t see to work with KMZ files which is what Navionics produced; it apparently would only work with KML files. A quick google showed that KMZ were just KML files and their accompanying support files compressed using the standard zip format—an awful lot like epub files. I could therefore unzip the KMZ and then upload the KML and it worked really slick. Of course I would have to figure out how to do this on my iPad or iPhone and that wasn’t working out to well for me.
Eventually, as a result of posting the tracks on my Facebook account via Navionics built in share button, I realized that the app automatically posted a KML files to their server that it used to synch the tracks between the instances of the app (iPhone, iPad etc.) as well as display on Facebook. Furthermore this link was actually in the email I had been using to extract the KMZ file—it is just that it was a tinyurl and I had been ignoring it as promotions or a link to the website. So, a quick copy in paste from the (now unsent) email into the WP app and I have my map.
Cool.
Hopefully this means next trip (6 days and counting) that I will be able to post the map of the day’s travels along with the blog post with no delays necessary. I guess we will see.