Class: exports.SensorThingsHttp

Core.ModelList.Layer.SensorThingsHttp. exports.SensorThingsHttp

new Core.ModelList.Layer.SensorThingsHttp.exports.SensorThingsHttp()

modules/core/modelList/layer/sensorThingsHttp.js, line 23
SensorThingsHttp is the software layer to handle the special needs of the SensorThingsAPI regarding the http protocol.
SensorThingsAPI: https://docs.opengeospatial.org/is/15-078r6/15-078r6.html

This software layer handles the skip response of the SensorThingsAPI as well as the call in the browsers extent.

To import SensorThingsHttp: import {SensorThingsHttp} from "./SensorThingsHttp";
create a new object:        const obj = new SensorThingsHttp()
call:                       obj.get(url, onsuccess, onstart, oncomplete, onerror, onwait)
call:                       obj.getInExtent(url, extentObj, onsuccess, onstart, oncomplete, onerror, onwait)
get the result via onsuccess = function (result) { ... }

Methods

get(url, onsuccess, onstart, oncomplete, onerror, onwait, httpClient){Void}

modules/core/modelList/layer/sensorThingsHttp.js, line 290
calls the given url from the SensorThingsAPI, follows skip urls, response is given as callback onsuccess
Name Type Description
url String the url to call
onsuccess function a function (resp) with the response of the call
onstart function a function to call on start
oncomplete function a function to allways call when the request is finished (successfully or in failure)
onerror SensorThingsErrorCallback a function (error) to call on error
onwait function a function to call on each step of a skipping SensorThingsAPI response
httpClient SensorThingsHttpClient optional the httpClient to use instead of the default

getInExtent(url, extentObj, onsuccess, onstart, oncomplete, onerror, onwait, httpClient){Void}

modules/core/modelList/layer/sensorThingsHttp.js, line 317
calls the given url from the SensorThingsAPI, uses a call in extent, follows skip urls, response is given as callback onsuccess
Name Type Description
url String the url to call
extentObj Object data for the extent
Name Type Description
extent Array.<Number> the extent based on OpenLayers (e.g. [556925.7670922858, 5925584.829527992, 573934.2329077142, 5942355.170472008])
sourceProjection String the projection of the extent
targetProjection String the projection the broker expects
onsuccess function a function (resp) with the response of the call
onstart function a function to call on start
oncomplete function a function to allways call when the request is finished (successfully or in failure)
onerror SensorThingsErrorCallback a function (error) to call on error
onwait function a function to call on each step of a skipping SensorThingsAPI response
httpClient SensorThingsHttpClient optional the httpClient to use instead of the default