new mapboxgl.supermap.FeatureService(url, options)
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
string |
The url of service. |
||||||||||||||||||||||||
options |
Object |
The optional parameters.
|
Example
new mapboxgl.supermap.FeatureService(url)
.getFeaturesByIDs(param,function(result){
//doSomething
})
Extends
Events
-
inherited initialized
ServiceBase.js, line 23 -
Triggered after the constructor construct succeeds.
Properties:
Name Type Description thisObject This object.
Methods
-
editFeatures(params, callback)
FeatureService.js, line 148 -
Edit features.
Name Type Description paramsmapboxgl.supermapEditFeaturesParameters The EditFeaturesParameters class.
callbackRequestCallback The callback of result data returned by the server side.
-
getFeaturesByBounds(params, callback, resultFormat, params, callback, resultFormat)
FeatureService.js, line 38 -
Get features by bounds.
Name Type Default Description paramsmapboxgl.supermapGetFeaturesByIDsParameters The GetFeaturesByIDsParameters class.
callbackRequestCallback The callback of result data returned by the server side.
resultFormatmapboxgl.supermapDataFormat DataFormat.GEOJSON optional The format of result data. getFeaturesByIDs(params, callback, resultFormat) { var me = this; var getFeaturesByIDsService = new GetFeaturesByIDsService(me.url, { proxy: me.options.proxy, withCredentials: me.options.withCredentials, serverType: me.options.serverType, eventListeners: { processCompleted: callback, processFailed: callback }, format: me._processFormat(resultFormat) }); getFeaturesByIDsService.processAsync(me._processParams(params)); }
/**paramsmapboxgl.supermapGetFeaturesByBoundsParameters The GetFeaturesByBoundsParameters class.
callbackRequestCallback The callback of result data returned by the server side.
resultFormatmapboxgl.supermapDataFormat DataFormat.GEOJSON optional The format of result data.
-
getFeaturesByBuffer(params, callback, resultFormat)
FeatureService.js, line 81 -
Get features by buffer.
Name Type Default Description paramsmapboxgl.supermapGetFeaturesByBufferParameters The GetFeaturesByBufferParameters class.
callbackRequestCallback The callback of result data returned by the server side.
resultFormatmapboxgl.supermapDataFormat DataFormat.GEOJSON optional The format of result data.
-
getFeaturesByGeometry(params, callback, resultFormat)
FeatureService.js, line 126 -
Get features by geometry.
Name Type Default Description paramsmapboxgl.supermapGetFeaturesByGeometryParameters The GetFeaturesByGeometryParameters class.
callbackRequestCallback The callback of result data returned by the server side.
resultFormatmapboxgl.supermapDataFormat DataFormat.GEOJSON optional The format of result data.
-
getFeaturesBySQL(params, callback, resultFormat)
FeatureService.js, line 103 -
Get features by SQL.
Name Type Default Description paramsmapboxgl.supermapGetFeaturesBySQLParameters The GetFeaturesBySQLParameters class.
callbackRequestCallback The callback of result data returned by the server side.
resultFormatmapboxgl.supermapDataFormat mapboxgl.supermapDataFormat.GEOJSON optional The format of result data.