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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.