Navigation Menu
loading content ...
Error Message
Macro 'toolbar' not defined, or not allowed to call [restricted_mode=False]
Rated /5.00 | Created 27 March 2009
verticals/geotw/geotiddlywiki.png
When I joined Osmosoft back at the beginning of October, shortly afterwards a project came our way regarding visualising data inside a pdf in an interactive way. Essentially this meant colouring countries on a map a certain colour depending on what the data in that pdf set. It was an interesting request that had Jayfresh and I looking through various existing "map stuff" out there - including google maps, OpenLayers, even an experiment using images and image maps. The conclusion we came to was they were either not open enough or too complicated.

Eventually we came across a geojson from a website called thematicmapping (url) which with a little modification gave us essentially all the data we needed to show and gave us the opportunity to link a country to the geometry that represented it. Thus quite easily we could also control how that geometry was presented on screen (ie. what colour that country would be and thus meeting our requirement of colouring countries depending on data) but also given us the opportunity to manipulate/use that data in interesting ways whether it be transforming it or detecting which country a mouse was hovering over or clicking on. Also since the coordinates provided by geojson are in longitude and latitude format it was thus quite easy to add geotagging functionality and quite feasible to be able to change the type of map projection (see wikipedia).

The resulting development is a library to display geojson files in canvas and give a google maps like experience with mouse panning, mouse wheel zooming, clickable countries and geotagging, and the beauty of it is it all works offline. I can see lots of use cases for this - whether it be a portable travel itinerary, showing geo caches, recording places of personal importance or simply displaying flickr photos/dopplr places to visit and so on and so on..

There's lots of exciting bits and pieces in this library in my opinion and I can't really cover them all in a blog post in great detail, however in a nutshell quite easily you should be able to get yourself in a position where you can geotag data using tiddler meta data and using UN standard country names alter the colour of countries on an instance of a map.

And in a nutshell here are my currently developer issues that if any fellow developers want to contribute ideas too, I would be most greatful.
1) Google maps has a static image server (link) - with a mechanism to alter the projection of this map library it would be relatively easily to place a google maps static image over the drawn map and thus provide more detailed maps to the extent google does.
2) canvas works beautifully fast in Safari and Firefox, however in Internet Explorer which only supports the canvas element through the Explorer Canvas (vml) performance is terrible for lots and lots of polygons. I have suspicions this is due to the way Explorer Canvas deals with transformations - I believe it creates a vml element for each polygon and destroys them and creates them from scratch for a transformation, I believe possibly through resizing and repositioning of these elements rather than recreating might bring better performance. Another possible way to deal with this is to give the illusion it is quicker through loading static images a la point 1 while the polygons render.
3) The detail in the geojson is not great when zoomed in. The library could really do with some higher resolution and lower resolution maps to be loaded on zooming in and out - this would bring great performance improvements as the less polygons to draw the quicker the rendering process. However to date I've not been able to find a repository of geojsons or uncover any greater detailed maps. Would be interested if anyone knows of a place.

So that's enough of me talking for the time being, here are some useful links:

First and foremost you'll probably want to see it for yourself:
geotiddlywiki example tiddlywiki

You may then be interested in looking at the code
code repository is here for geotiddlywiki svn code.

Thanks for reading this far. Did I bore you or interest you? Let me get better at doing the latter and focus more on working on the good stuff...
Error Message
Macro 'ratemytiddler' not defined, or not allowed to call [restricted_mode=False]
Comments
Error Message
Macro 'tiddlyWebComments' not defined, or not allowed to call [restricted_mode=False]
a list of older blog posts can be found at here

Please ignore the following if you are using a text browser (this is part of the TiddlyWiki application used to run this software):