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's gravatar image

appleton
21113
accept rate: 0%

edited 05 Jul '12, 16:56


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.

permanent link

answered 05 Jul '12, 18:48

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
71.1k846451108
accept rate: 24%

Thanks Frederik. I have a lot to read up on. :)

(06 Jul '12, 16:48) appleton

If you're thinking of a .NET program then OpenStreetMapViewer might be suitable for you. Similar code exists for Java, Flash, and other environments.

Is there existing code for C++ ?

(06 Jul '12, 18:29) appleton
1
(06 Jul '12, 19:28) SomeoneElse ♦

(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:

  1. Continuous zoom - you're not restricted to web map zoom levels.
  2. You can change the map styling, what gets rendered etc. interactively.

If you're interested, the map control is available for commercial use, too.

permanent link

answered 07 Jul '12, 11:19

Breki's gravatar image

Breki
2.0k51743
accept rate: 10%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×272
×207
×42
×9

question asked: 05 Jul '12, 16:49

question was seen: 3,851 times

last updated: 07 Jul '12, 11:19

powered by OSQA