for our software we had to implement an own ServiceImageTiledLayer foreach level of detail/ zoom levels. Therefore each tiles layer consist of a tile cache with only the top zero layer and not all detail layers in one cache. Hope that this is clear enough. Through our constraints it is not possible to put them all together in one custom layer instance.
The standard MapView behaviour is to make them visible and invisible on the different zoom levels according to an unknown decision metric based on resolution and scale from the LevelOfDetail. That works so far, if we add the caches in a sorted order according to the resolution of each cache. But then we see some problems to display them correctly to our requirements. I try to use practical words to avoid missunderstandings in the words. Please tell me if something isn't clear enough.
The desired behaviour:
So, my question would be if it is possible to solve this issues or to work around them? Otherwise is there a behaviour specification for this layer visibility or can we handle this ourselve?
Thanks for all help.
The desired behavior you're describing should be how tiled layers works.
It's not clear to me what the problem you're having is, or why the existing tiled layers doesn't do what you need.
I agree, this is also my understanding. In our scenario, we have foreach level of detail an instance of a derived ServiceImageTiledLayer. I will call it CustomTiledCache from now on. So these CustomTiledCaches have only one level of detail within, but all together represent a standard tiled cache behaviour. The reason why is simple. We share these data structures with another program and can't change it. The problem we have there is the minimal different extent for each level of detail.
As an example we have maps in 100k, 50k and 10k scale loadet and there are zoom steps showing no map between two caches. We couldn't fix this, because of the implemented visibility automatic from the MapView,Renderer, or whatever controls it.
I hope this gives a better view on the problem?
Are you able to provide the code and data that reproduces the problem? (Geonet has a 10MB upload limit - you can email firstname.lastname@example.org with details of a download location, or to request an online folder share)
If you're not able to provide the code and data, we'll need to understand more details:
- To which layer collection are you adding the tiled layers? (e.g. Map.Basemap.BaseLayers)
- What are the properties for the MinScale, MaxScale, and TileInfo for each layer you have?
Thanks to everyone who can help or offered help.
I have to apologize for the late reply. We are very busy at the moment.
I added a demo of the problem to my first post and hope that makes it more clear to you.
The demo is a little and rapidly build application of our problems and is so far not polished.
To creat it we use Visual Studio 2017, .Net Framework 4.6.1 and nuget.org.
The application itself creates four tile caches based on our existing map material which I can’t provide.
because we have some proxy issues to get it from the Esri servers.
Please let me know if we do something wrong in the code, you have improvements for us or something has to be explained in more detail.
Thanks a lot.
I've been looking at your reproducer (thanks for that), and I'm a little confused. If you only want to one "cache" at a time, why aren't you just using a single custom layer and direct the file URIs to the correct "cache" based on the LOD that's requested in GetTileUriAsync ?
We use different caches for each level, because the extent of each cache differs a bit and we are in a situation where we can't change the tile format/structure.
You can see that they are not congruent when you zoom into the map in the reproducer. The extents of the caches are from a real example.
Thanks for investigating.
> We use different caches for each level, because the extent of each cache differs a bit
Just set an extent that encompasses all of the extents.
Also set 'myTiledLayer.NoDataTileBehavior = NoDataTileBehavior.Blank;' to prevent upsampling of higher-level LODs and only show a single LOD at the same time.