You are hereForums / General Discussion / Site topics / Colour Coded Trails

Colour Coded Trails


Rob's picture

By Rob - Posted on 21 January 2009

Manly Dam in Google Earth

Some of you may have noticed a whole heap of 'Track' content types popping up recently. This is as we will finally have colour coded maps shortly. All the KMZ files have been previously created by hand which meant the author (whoever that was Eye-wink) decided to draw the trails in completely random colours.

Soon the KMZ (well, KML file, actually) will be generated from the data in these 'Track' nodes on the site, meaning they can be colour coded according to type (firetrail, single track, etc.). An example of what this looks like is Manly Dam seen here. OK, sneak peak of full auto generated file here.

As a by product of all this we'll get some stats on Km of trails by type, location, etc.

And just a reminder of course, anyone in the Content Authors group can create a write up of an area worth riding in, and now create 'Track' content types too so individual trails can be mapped and discussed. There's more on that in the Content Author's Reference.

ar_junkie's picture

May I suggest a legend for the colours?

philberesford's picture

Nice one Rob Smiling

christine's picture

so clever!

Rob's picture

There's always one! :P

Legend is...

/* TODO: Load this from a variable */ global $trackfield_kml_out_style_map; $trackfield_kml_out_style_map = array( 1382 /* Double Track - Orange */ => array('col' => '7f00aaff', 'wid' => 4), 1383 /* Firetrail - Yellow */ => array('col' => '7f00ffff', 'wid' => 4), 1983 /* Hike-a-bike - Pink */ => array('col' => '7fffaaff', 'wid' => 4), 1384 /* Mixed - Cyan */ => array('col' => '7fffff00', 'wid' => 4), 1385 /* Single Track Enclosed - Lime */ => array('col' => '7f00ffaa', 'wid' => 4), 1386 /* Single Track Exposed - Green */ => array('col' => '7f00ff00', 'wid' => 4), 0 /* Default - Cyan */ => array('col' => '7fffff00', 'wid' => 4), );

LOL... erm... oops... mod's joke ;)

philberesford's picture

Luckily I can understand Hex colour

LOL

Noel's picture

That's great news.

My web browser must be faulty though. The two bits on Manly Dam where I have to carry my bike don't come up pink for me.

hawkeye's picture

Good sstuff - great idea! Smiling

Any chance we can perhaps use more contrasty colours than yellow, lime green and regular green? I know I'm an old fart, probably blind and bordering on dementia Eye-wink, but I have a bit of trouble picking between them in the screenshot.

ar_junkie's picture

I was referring to those you may not venture that far and simply look at an image (jpg etc) like the example you posted.
Create a 'sticky' or throw it in the "help!" section...

Just a thought - use it, don't use it...
Eye-wink

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Best Mountain Bike