×
Center Map | Maps SDK for C++ | General Magic Center Map — Maps & Navigation SDKs documentation
Skip to content

Center Map

Center the map view over a pair of coordinates.

Center Map

Use case

Present a given area of the world map in a window.

How to use the sample

First, get an API key token, see the Getting Started guide.

Download the Maps & Navigation SDK for C++ archive file for Linux or Windows

When you open the sample, you’ll be viewing the scene from above. The map view will move over the given set of coordinates.

How it works

  1. Create a MapViewListener, OpenGLContext and MapView.

  2. Instruct the MapView to center on desired coordinates.

  3. Allow the application to run until the map view is fully loaded.

C++ Examples

Maps SDK for C++ Examples can be downloaded or cloned with Git