简体   繁体   中英

Create a time lapse of point features in Openlayers

I am building a map application in which I have a Postgis database with point features. I import the database into Geoserver as a layer and I show the WFS layer using Openlayers. My point features have a timestamp and I was wondering if it is possible to build something like a time lapse function, which will accept a range of time (date) and then start importing the features one by one on the map. I searched but I didn't find a similar example online. Have you done/see something like this?

I wouldn't bother with Geoserver, but would try something like this: + create a service that returns the points as geojson from Postgresql. + Get that Geojson via Ajax + In Openlayers create a vector layer + In JavaScript write a function that adds the points to the vector layers with some sort of timer

Sorry I can't provide code samples - I'm posting from my mobile - but each element I've listed above is pretty straightforward.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM