How can be removed some of the current Tile Providers, and added others ( from my local network Tile Server ) to the menu ?
( this menu )
Welcome to the Cesium community!
You can use the view model for the base layer picker to add/remove imagery providers, see this discussion: Add a new ProviderViewModel to BaseLayerPicker dynamically OR add a 2nd BaseLayerPicker?.
What kind of project are you working on?
Thank You Omar for Your reply, but I am not quite sure I do understand how to do this thing.
Is there some example with working demo or something ?
My local providers is in format http://192.168.0.103/tiles/{typeoftile}/z/y/x.png (local OSM build), but not sure how to implement it and show an icon in the drop down menu.
I am trying to show changes in the maps in the local area during different periods, as well a historical events which changed some of the things around.
We don’t have a live code example for it, but you can find a few snippets of how to do this on the forum, like in this discussion: Defining new Cesium.ProviderViewModel with url from String array
A better way to do it for your use case would be to either:
- Create an HTML UI, like a dropdown, that selects each layer you have, instead of the built-in base layer picker widget
- Attach it to the timeline, so the user can scrub the timeline at the bottom to see changes automatically over tiem.
For option 2 you’d have to create an onTick event, listen for the current time period, and based on that pick the right imagery layer to show.
Got it ! Thank You Omar !!