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 urlString the url to call onsuccessfunction a function (resp) with the response of the call onstartfunction a function to call on start oncompletefunction a function to allways call when the request is finished (successfully or in failure) onerrorSensorThingsErrorCallback a function (error) to call on error onwaitfunction a function to call on each step of a skipping SensorThingsAPI response httpClientSensorThingsHttpClient 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 urlString the url to call extentObjObject data for the extent Name Type Description extentArray.<Number> the extent based on OpenLayers (e.g. [556925.7670922858, 5925584.829527992, 573934.2329077142, 5942355.170472008]) sourceProjectionString the projection of the extent targetProjectionString the projection the broker expects onsuccessfunction a function (resp) with the response of the call onstartfunction a function to call on start oncompletefunction a function to allways call when the request is finished (successfully or in failure) onerrorSensorThingsErrorCallback a function (error) to call on error onwaitfunction a function to call on each step of a skipping SensorThingsAPI response httpClientSensorThingsHttpClient optional the httpClient to use instead of the default