Add Labels (addlabel)
Introduction
Demonstrate adding annotations through custom controls, setting annotation text size, color, rotation angle, etc.
Operation effect
Figure: Add Labels Operation Effect |
Location
Android Studio
- Product package: Product package catalogue\SampleCode\SampleCode_AndroidStudio\AndroidStudioSampleCode\addlabel
Data
Storage location
- Product package: Product package catalogue\SampleData\AddLabel
Deployment Location
- mobile device internal storage\SampleData\AddLabel
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, com.supermap.services.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 |
---|---|
canvas | drawText(), drawBitmap(), rotate() |
Basic steps
- Click [ADD LABEL], enter the annotation content, and set the annotation color;
- Rotate, zoom, and pan edit text controls, and finally save them to the dataset.