first last

Hiking Maps Coming Soon

Hiking Maps Coming Soon

No new Gort Card drawings today. That's because I made tacos for dinner at home instead of eating out at Wendy's. As I described yesterday it is difficult for me to focus on tasks like drawing or writing at home. There are too many other things to distract me.

Instead of drawing I started adding a new photo album. This summer I did a record breaking amount of hiking. Since I am new to the Spokane area and had no one to hang out with, I hiked like a crazy person. The emotional transition to a new area where I know zero humans has been extremely difficult, and hiking was my deliverance. My desire is to post photos from all my hikes, but it will take a very long time. I'm very picky about how I prepare the photos. Unfortunately I shoot many panoramas and often in RAW, so it takes forever to work on them.

Speaking of getting distracted, instead of uploading the new album I worked on other semi-related stuff. For many years my hand-coded blog has been capable of custom CSS for individual posts. Today I decided to put that feature to use. How do you like the rainbow cycling color junk? Don't worry, it doesn't affect my entire site, just this page (little over a month later, I took away CSS color cycling and made it a simple calculation only on page refresh... to save battery life for phones that would need to constantly paint colors! Also, the accent color is always the compliment to the background via opposite on the 360 degree hue wheel). Just a funny way to demonstrate the CSS feature. I also changed the column count for this post only so the maps wouldn't be too small. If desired I can change the layout of the whole page for each blog post. Kinda cool.

My other diversion tonight was to add the capability for custom javascript on each blog post. Embedded maps has long been a desired feature for sharing my hiking experiences. I recorded GPS tracks for all my hikes this summer on my Garmin, so I'm ready to put the tracks to use. The javascript feature was necessary in order to show a preview in this blog post of how it works (and how easy it was to add from scratch in one evening).

Fortunately I found a mega awesome javascript library called GPXViewer. The original author is Kaz Okuda. Chris Peplin made a GitHub fork of the project and revised the code to work with Google Maps API v3. Excellent! GPXViewer is one of the most awesome pieces of code I've ever seen because it solves my exact problem with zero modification necessary. Never before have I encountered a script that is so plug & play and with such awesome functionality! Not a lot of code and very easy to understand. Literally all you have to do is paste his code in your page and change a few variables. You also have to set up a Google Maps API key so Google will allow their maps to display on your site. I have already messed with that stuff in the past, so no problem.

GPXViewer displays GPS tracks, routes and waypoints (as well as custom HTML within the pins on the map!) simply by pointing to a GPX file. For those who don't know, GPX is the most common file type for storing GPS track information. Most GPS devices save tracks in this simple XML-based format. Since I already have GPX files for all my hikes this summer, it will be insanely easy to add interactive maps to my hike posts! I was somewhat dreading to write this feature myself because the Google API documentation can be crazy long and confusing to parse through (though their example code usually makes it pretty easy). I'm so glad someone else did all the hard work for me. Thank you so much Kaz and Chris! Now let's just hope Google doesn't change their API again anytime soon.

I embedded a GPS track using GPXViewer below. Yes! Seriously exciting stuff. I even added a pin with an image information window when you click it. This isn't a photo from the hike, but it is worth noting that Nema and Chrysanne live in this vicinity. I didn't place the pin exactly on their abode in order to respect their privacy. Chrysanne is a type of magical elf and Nema is a troll, so don't expect to spot either of them. Of course their cave is cloaked by powerful magic. Just use your imagination.

The cover image at the beginning of this blog post is a screenshot of one of my hikes this summer. I thought it would be the funniest to share because nowhere else did I do so much wandering, attempting to find every trail! It will be one of the many I write about later.

first last