I'm just starting to look at openstreetmap to see if it is possible to add a scrolling map to an existing Windows desktop program. The map would look something like the bottom-right window here http://www.youtube.com/watch?feature=player_embedded&v=r4rwMV7hhaY#at=840 which shows the current position of a moving vehicle. A "current" set of GPS coordinates would somehow be passed to the map which would have a central marker to show the current position, and the map would scroll slowly so that the marker was always in the center. The example in the video clip seems to be using Google Maps, but this is very expensive to use even for a small commercial program. Has anyone written a similar module for openstreetmap? Also, the map images would have to be fetched from a server as it scrolled. I believe that openstreetmap has servers which provide the images, but what are the restrictions on using these in a commercial program? Would a user of such a program get "cut off" from the openstreetmap image server if they were using it too heavily? asked 05 Jul '12, 16:49 appleton |
There are numerous libraries that provide some sort of tile-based map display like OpenLayers does in a browser; you can usually find them by searching for "OpenLayers clone in <programming language>" or so. If you're thinking of a .NET program then OpenStreetMapViewer might be suitable for you. Similar code exists for Java, Flash, and other environments. You are right about the map images ("tiles"). It is ok to load them from OSM for testing and there is no "non-commercial" restriction, however if your application starts to produce noticeable traffic then you are expected to set up your own tile server or use a commercial offering. See switch2osm.org for further information. answered 05 Jul '12, 18:48 Frederik Ramm ♦ Thanks Frederik. I have a lot to read up on. :)
(06 Jul '12, 16:48)
appleton
Is there existing code for C++ ?
(06 Jul '12, 18:29)
appleton
|
(Disclaimer: I'm the author of Maperitive). Maperitive uses its own WinForms control for displaying both the web and vector maps (written in C#). Given your use case you should consider drawing vector maps (using OSM data) instead of downloading tiles - this way you can have all the necessary data pre-loaded on the desktop, without the need for a web connection. There are some other benefits:
If you're interested, the map control is available for commercial use, too. answered 07 Jul '12, 11:19 Breki |