maandag 15 februari 2016

Data on the Map

Part of showing measurement data is also showing where it comes from. So a map is required, with some markers and maybe some additional information.
Using Google Maps is probably the easiest way to show just a map with some markers. From the past I remembered that it was not allowed to use Google maps in commercial applications, but this has changed and currently its free for something like 2500 page-views per day. So that will not be problem.



Other options may be OpenStreetmap. This data is definitely free forever. When looking for a library to display OpenStreetmap data the first option is usually OpenLayers. This is a very feature-rich library that all kinds of chart manipulation. But the version 3 is also more than 500 K of javascript, which seems a bit overkill to me for just showing some positions. Looking bit further I found 'Leaflet', a lightweight library for showing maps. On their main page they claim it's only 33 KB, but the version I downloaded is 123 KB, so it probably grown a bit since the initial release.