Month: January 2013

Using OpenStreetMaps

Introduction

With the dawn of new year 2013, it seems like things getting busy. But taking the vacation as an opportunity I thought of writing on OpenStreetMaps (OSM), which could be the best alternative to the Google Maps. OSM is an opensource project which contains data related to maps. There are several organizations which uses these data for their purposes and feed data to enrich the OSM project. From this big source of data, one can pick data that he wants and use them for his project.

Like in my previous articles, this time I’m not going to give an example. But I’m pointing to resources that would be useful when working with OSM.

Uses of OpenStreetMap

OSM is currently used for many purposes such as for resources, 3D maps, mobile applications, web pages etc. To provide such facilities, there are vast number of applications developed around this core OSM project. Not only getting data from OSM, you can contribute to it by providing data. For more information about using OSM; refer this link.

Adding OSM to a web page

Just like Google Maps, there are frameworks which provide web maps. Two main frameworks are OpenLayers and Leaflet, which allow you to add OSM maps with simple JavaScript code. You can find tutorials on adding OSMaps to web pages from here.

Leaflet Map

Reverse Geo-code and find places

With OSM, Nominatim gives oppertunity to search a place’s longitude and latitude through address and vise versa. For examples and guide lines refer this link.

Eg:

Searching: http://nominatim.openstreetmap.org/search?q=galle,+sri%20lanka&format=xml

Reverse Geo-code:  http://nominatim.openstreetmap.org/reverse?format=xml&lat=52.5487429714954&lon=-1.81602098644987&zoom=18

Joomla Plugins

Currently based on this OSM, I have created a plugin and a module that could be added to Joomla web sites. They are as follows:

Joomla Plugin: http://joomlaosm.webege.com/index.php/plugin/plugin-documentation

Joomla Module: http://joomlaosm.webege.com/index.php/module/module-documentation

Other OSM based services

Through this article, I talked a very small portion about the capabilities of  OpenStreetMap project, but there are so many use cases of OSM. This link will take you to a list of services which are available, almost all are free.

Heat Map 3D Globe 3D Map

For developers

If you like to develop applications based on OSM, there is an API to access data in OSM project. Currently it’s at version 0.6 and brainstorming for version 0.7 . For editing OSM you can use API or JOSM application.

Finally what I have to say is, OSM maps are not enriched as Google maps, but day by day people feeding data. Therefore one day, this project may be use in cutting edge researching to mobile phone applications.

References

[1] Using OpenStreetMap – http://wiki.openstreetmap.org/wiki/Using_OpenStreetMap

[2] OpenStreetMap Frameworks – http://wiki.openstreetmap.org/wiki/Frameworks

[3] OpenLayers – http://wiki.openstreetmap.org/wiki/OpenLayers

[4] Leaflet – http://leafletjs.com/

[5] OpenLayer tutorial – mappinghacks.com/talks/foss4g2006/openlayers.ppt

[6] Nominatim – http://wiki.openstreetmap.org/wiki/Nominatim

[7] OSM based services – http://wiki.openstreetmap.org/wiki/List_of_OSM_based_Services

[8] OSM API – http://wiki.openstreetmap.org/wiki/API

[9] JOSM – http://josm.openstreetmap.de/

[10] Beginners’ Guide – http://wiki.openstreetmap.org/wiki/Beginners%27_guide

Advertisements