Blog
All Blog Posts | Next Post | Previous PostTMS WebGMaps brings submarkers and extra options to load POI files
Tuesday, June 20, 2017
We're pleased to announce TMS WebGMaps v2.9 has been released today. TMS WebGMaps is our VCL component that exposes a myriad of geographical functions for integration in Delphi or C++Builder Windows applications.In this new version, we introduce submarkers. When at a given position, more than one interesting item can be highlighted, it is now possible to add multiple items via submarkers at the same position and when the main marker is clicked, the submarkers are displayed.
In the sample, we've coupled different interesting items to see in Florida via submarkers for the marker at Florida. When the marker is clicked, different submarkers are displayed showing POIs such as Disney park, Cape Canaveral, Orlando resort... This technique keeps the number of simultaneously displayed markers light and only shows the detail when the user is interested and clicks the main marker.
Adding a marker with submarkers is very easy as this code snippet shows:
var m: TMarker; sm: TSubMarker; begin m := WebGMaps1.Markers.Add(WebGMaps1.MapOptions.DefaultLatitude, WebGMaps1.MapOptions.DefaultLongitude); m.Title := 'Florida Landmarks'; sm := m.SubMarkers.Add; sm.Title := 'Walt Disney World'; sm := m.SubMarkers.Add; sm.Title := 'Cape Canaveral'; .... end;
In the new version, we have also refined the functions to load & save markers in POI file format. A POI file is a file that contains geocoordinates and description of places of interest. Now it is also possible to specify custom marker images when loading POI files. TMS WebGMaps can handle the POI file format as used by well-known navigation software such as Garmin, Tomtom, Route66, Becker, ...
There is a wealth of already existing POI files you can directly use with TMS WebGMaps. A resource of millions of POI files for 221 countries is for example www.poiplaza.com. In our sample, we have demonstrated this by loading a POI containing for example the IBIS hotels and movie theatres in Germany.
The code needed for this is just two lines:
WebGMaps1.Markers.LoadFromPOI(FilePath + 'D-Cinema.csv', FilePath + 'projector_24.png'); WebGMaps1.Markers.LoadFromPOI(FilePath + 'D-IbisHotel.csv', FilePath + 'ibis_24.png');
It refers to the POI filename and the (local) marker image to use. The WebGMaps component does all the needed things to show the custom Ibis image marker on the map in Germany for the Ibis hotel locations and the movie theatre image for the movie theatre locations.
We look forward to learn about your interesting integrations of TMS WebGMaps in your applications!
Bruno Fierens
This blog post has received 2 comments.
2. Sunday, August 5, 2018 at 8:08:20 PM
The tile server for Google Maps cannot be changed. It can be changed for the TWebOSMaps component though via the TileServerURL property
Bruno Fierens
All Blog Posts | Next Post | Previous Post
You have presented a great component.
Is there a possibility to change the server for the maps?
For example, use OpenStreetMap?
Hosein Pakdel