Access Service (service)

Introduction

Demonstrate input service name, map name, layer name, SQL statement, query and download the corresponding data in the server, and display it on the map.

Operation effect

Figure: Access Service Operation Effect

Location

Android Studio

  • Product package: Product package\SampleCode\SampleCode_AndroidStudio\AndroidStudioSampleCode\service

ADT

  • Product package: Product package\SampleCode\SampleCode_ADT\Service

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
libimb.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
QueryService query(), setResponseCallback()
ServiceQueryParameter setQueryServiceName(), setQueryMapName(), setQueryLayerName(), setExpectRecordCount(), setQueryRecordStart(), setQueryOption(), setAttributeFilter()

Basic steps

  1. Click the Setting button to set the server address and port number;
  2. Input the service name, map name, and layer name:
  3. Input the query statements. Click the Query button and the result will be displayed on the map.