Location (displaylocation)
Introduction
Demonstrate the GPS location of the mobile terminal and display the current location in the center.
Operation effect
Figure: Location Operation Effect |
Location
Android Studio
- Product package: Product package\SampleCode\SampleCode_AndroidStudio\AndroidStudioSampleCode\displaylocation
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 |
libimb2d.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 |
---|---|
LocationManagePlugin | openGpsDevice(), setTimeInterval(), addLocationChangedListener() |
DatasourceConnectionInfo | setAlias(), setEngineType(), setDriver(), setServer() |
Basic steps
- Click the [OnLocation] button to locate the location;
- Click the [Stop] button to stop positioning;