Delphi + OpenStreetMap

Is there a vcl or project (in delphi) that will allow me to download OSM tiles and display them in the application?

I tried to implement the browser and it worked great, but I need a way to display maps offline.

+4
source share
5 answers

As I can see, there are 3 ways to do this:

Best regards, Mo3ez

+3
source

I do not know the OpenStreetMap project very well, but it is likely that the project itself has software for "viewing" maps inside the page.

You can accomplish your task: show maps offline using the same basic design as for the user interface: built-in browser.

What you change is the URL with which the browser will connect to something like http: // localhost: 3458 ), which makes your application your web server, for example, with Indy TIdHTTPServer bound to port 3458 (only an approximate port )

This way you can serve the contents of the embedded browser inside your application in the same way . The Delphi IDE (> = 2005) itself provides the content for the main page that you see when you start it (in fact, a built-in web browser).

In this browser you are viewing the viewing page, all its dependencies and the OSM file. The only limitation of this idea is that the viewer SHOULD do everything on the client side (for example, it can be javascript, flash, etc.). There are no server-side scripts unless you want to "simulate" server-side behavior or integrate the application with a script engine (not too simple).

Another chance is to use THBImage , which offers integration of OpenStreetMap with Delphi and a demo (non-working) page of the site.

+2
source

Oops! I tried to provide several hyperlinks in my post, but as a new StackOverflow user, I am limited to only one. You can check the “Necessary solution for displaying a map” message flow (January 25, 2010) at embarcadero.public.delphi.thirdpartytools.general

I am trying to solve a similar problem. I need to display a map of a county or citywide using Delphi, and then put custom icons on the map. I do not need routing or a very detailed map. I used to use the TMS component "hotspot" for custom icons on top of TImage. Now I need the client to be able to choose their own map for a static background image.

A free MFC GUI management class (with source code) that implements the display of OpenStreeMap plates: www.naughter.com/osmctrl.html The zip has an executable file that shows how it works.

This device should calculate the URLs for the OpenStreetMap Project TileServer and other useful utilities that you might need. If you want to use OpenStreetMap in your pascal programs, then this is for you. http://code.google.com/p/openstreetmap-fpk/

I am also considering using the free Tiger / Line cards. They look good in the free Linux program (xastir).

TatukGIS looks very good (and expensive). Of course, I don’t need a complete GIS solution, so it seems like it is too complicated to display a map. But if I do not find a simpler solution, it may be better than the integration of MS MapPoint.

TGlobe seems to me what I need, but, unfortunately, it is no longer available.

+2
source

Check out StelMAP for Delphi with OSM

A component for viewing the OpenStreetMap project map for Delphi 2010 without using a browser or scripts.

You can view maps offline. Support for proxies for working on the Internet. A multi-threaded tile loading map accelerates the process of loading and viewing maps. A set of procedures and properties allows you to add a component to display an unlimited number of layers, shapes and images.

+1
source

I don't know about OSM files, but if you can open them in a browser, you can always embed TWebBrowser in a Delphi application and load files into it.
Not the most elegant, but should work ... (requires IE)

0
source

Source: https://habr.com/ru/post/1299626/


All Articles