- Notifications
You must be signed in to change notification settings - Fork2
Basic examples for bringing SensorThingsAPI Locations and HistoricalLocations to web maps as markers or trajectories.
License
tum-gis/FROST-on-a-map
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repo contains some basic examples on how to queryLocations
andHistoricalLocations
from anOGC SensorThingsAPI conform service,as for instanceFROST-Server instance and place themon a web map using Open Source mapping APIs likeLeaflet.js.
Plot the lastLocations
of allThings
on a map and add a popup to the markers with basicinformations on theThing
. To cluster markers at the same locationLeaflet MarkerCluster is used.
Adapt line 16 ofjs/locationMarkers/locationMarkers.js
to change the FROST instance.
// Configure FROST instancevarfrostBaseURL='https://my.frost.server.de/FROST-Server/v1.1';
OpenlocationMarkers.html
in a browser to view the results.
Query the last nHistroicalLocations
from a givenThing
in a time period (optional)and plot a trajectory withArrowHeadsfrom it.
Adapt lines 15-18 ofjs/trajectory/trajectory.js
:
// FROST server, Thing, number of HistoricalLocations, time filter (optional)varfrostBaseURL='https://my.frost.server.de/FROST-Server/v1.1';varthingIotID=16;varnHistoricalLocations=10;vartimeIntervalFilter='$filter=time%20gt%202020-10-20T00:00:00.000Z%20and%20time%20lt%202020-10-22T23:59:59.999Z';
Opentrajectory.html
in a browser to view the result.
About
Basic examples for bringing SensorThingsAPI Locations and HistoricalLocations to web maps as markers or trajectories.