Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Working with TMapView on iOS and Android with RAD Studio XE8

The new maps component in RAD Studio XE8 simplifies the addition of mapping functionality to mobile applications. TMapView provides map API access for iOS and Android. It makes use of the Google Maps Android API on Android and the Map Kit Framework on iOS.

The key features of the TMapView component are:

If you are using TMapView on Android, you will need to obtain a Google Maps API key.

RAD Studio XE8 ships with two maps sample applications for Object Pascal and C++.

Object Pascal:

C++:

I created a small demo project that uses the Spitcast REST API, REST component framework, FDMemTable and TMapView to display surf locations on my map based on the longitude, latitude and spot name information returned from the REST service. A custom marker graphic in the shape of a surfboard fin is used to indicate the locations on the map.

You can download my demo project here. 

Here is a code snippet from the demo project:

[crayon-676e9c7a5bcb4594538666/]

Here is the app running on my iPad:

Here is a quick code snippet on how to clear the markers on the map:

[crayon-676e9c7a5bcbb137916589/]
Do you want to create an app for iOS, and Android? Try the Cross-Platform Development tool, which can help you create apps in the Delphi or C++ environments.
Try it out and make the most of it. Request a Product Demo here.
Exit mobile version