Data Service (dataservice)
Introduction
Demonstrate the data service of docking SuperMap iServer, upload, download, update and delete data.
Operation effect
Figure: Data Service Operation Effect |
Location
Android Studio
- Product package: Product package\SampleCode\SampleCode_AndroidStudio\AndroidStudioSampleCode\dataservice
ADT
- Product package: Product package\SampleCode\SampleCode_ADT\DataService
Data
Storage location
- Product package: Product package\SampleData\GeometryInfo
Deployment Location: mobile device internal storage\SampleData\GeometryInfo
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, gson.jar, okhttp.jar, okio.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 |
---|---|
DataDownloadService | updateDataset(), downloadDataset() |
DataUploadService | commitDataset() |
Basic steps
- Click the [Download] button to download the data set, prompting whether the download is successful or failed;
- Click the [Delete] button to delete some objects in the data set, indicating whether the deletion is successful or failed;
- Click the [Upload] button to upload the data set object, prompting whether the upload is successful or failed;
- Click the [Update] button to update the data set, indicating that the update is successful or failed.