简体   繁体   中英

How to animate a Geoserver layer in mapbox?

I'm using Mapbox SDK on my Android app and I want to display a layer coming from my geoserver.

I selected WMS format and works well.

Next step is to animate that layer to show a time-lapse, by providing a time property that ticks every X seconds and update the layer tiles. WMS supports time property to request a TileSet for a specific time, but I don't know how to set that time in MapBox and update the map TileSet. The example is the classic weather application.

If WMS is not the right choice I can choose another format, if is supported by geoserver.

There are a few different ways that you could animate georeferenced images using the Mapbox Maps SDK for Android. One is to use an ImageSource (which allows a georeferenced raster image to be shown on the map), and then follow this example to show a time lapse.

To continue using the WMS framework, you could usethis example to show a WMS source (which it sounds like you have already done successfully). The Mapbox Maps SDK for Android does not have an underlying mechanism for representing updates in time, but you could query your GeoServer and use the results in conjunction with a Runnable , similar to the RefreshImageRunnable in the first example I linked.

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