Send an Invite      Sign in   
Tuhunga logo
Sign up now

More map improvements - display and interact the way you want

Written by Jason on July 11, 2013

We're very pleased to announce custom KML plotting on maps in our interactive dashboards. Users can now define their own lines, points and polygons in a report, plot them on a map, and add controls to let other users navigate through the details.

Here's a quick example of it in action - the interactive lines below represent the top 100 US air travel city pairs in Q4'12. The line width is proportional to passenger counts and the color varies by yield (green is low yield, orange is high).

This dashboard was created using the Q4'12 US consumer airfare report data.

Keep reading to learn how to create your own custom KML charts.

If you're not familiar with KML, Google has provided a tutorial to get you started (link).

To feed KML to Tuhunga's Map-KML (Custom) charts, you'll need one column in your report that contains a single <Placemark> tag and its contents. For instance, for each row in your filter output, using the following formula as the KML source will create a blue line of random width between the points defined by LatitudeOne,LongitudeOne and LatitudeTwo,LongitudeTwo (please note the order of the coordinate pair below) along with an infobox with a name and description when the line is clicked:

concat("<Placemark><name><![CDATA[A randomly generated line]]></name><description><![CDATA[<span style='font:10px arial, sans-serif'>With some formatted text</span>]]></description><LineString><coordinates>",LongitudeOne,", ",LatitudeOne,", 0 ",LongitudeTwo,",",LatitudeTwo,",0</coordinates></LineString><Style><LineStyle><color>ffff0000</color><width>",round(rand()*10,0)+2,"</width></LineStyle></Style></Placemark>")

The formula looks more complicated than it is, we promise. If you haven't used KML before, our standard Map-KML chart isn't quite as flexible, and currently does not support the interactive controls seen above, but is a good place to get started. Or you can simply copy the formula above and change the lat/long coordinate pairs to meet your needs.

We hope you find these new capabilities useful, and of course, please get in touch if you'd like our help when you're working with KML.

For reference, here are some of our prior mapping improvements:

Tags: examples, features


  About    Contact    Legal    Privacy    Follow us on Twitter  

© 2009 - 2013. All Rights Reserved.