Working with maps

One of the most useful components in mobile apps is a map. Delphi comes with the cross-platform TMapView component that makes it easy to embed a map in an app.

On Android, it uses the Google Maps Android API and on iOS it uses the Map Kit Framework. On Android, it is necessary to first obtain the Google Maps API key. There are different possible view types on each platform. A map can be displayed as Normal, Satellite, or Hybrid. On Android there is also an additional Terrain view mode.

Let's build a simple app to try out different TMapView features. Create a new multi-device, blank Delphi app. Save the main form as uFormMap and the project as MapApp. Change the Name property of the form to FormMap. Drop TToolbar on the form ...

Get Expert Delphi now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.