Compass Control (compass)
Introduction
Two kinds of compass controls are added to the demonstration, and the direction of the compass is automatically adjusted with the rotation of the map.
Operation effect
Figure: Compass Control Operation Effect |
Location
Android Studio
- Product package: Product package catalogue\SampleCode\SampleCode_AndroidStudio\AndroidStudioSampleCode\compass
Data
Storage location
- Product package: Product package catalogue\SampleData\DOM
Deployment Location: mobile device internal storage\SampleData\DOM
License
Offline license, copy the license file to the "mobile device internal storage\SuperMap\License" folder.
Library
jar |
---|
com.supermap.data.jar, com.supermap.mapping.jar |
so |
ibimb2d.so, libgnustl_shared.so, libQt5Core.so, libQt5Gui.so, libQt5Svg.so, libQt5Widgets.so(Note: Starting from version 11.1, the last five so libraries need to be added.) |
Key types/members
Control/Class | Method |
---|---|
SensorManager | getDefaultSensor(), registerListener() |
Basic steps
- Rotate the map, and the small compass rotates with the map;
- Click the small compass and jump to the full-screen compass.