Select to view content in your preferred language

Tiles from a custom TiledMapServiceLayer class don't load anymore after migration

1650
6
10-06-2011 11:38 AM
AndreMachado
Emerging Contributor
Hello,

I've been using the ArcGIS WPF API 2.2 BETA for months and I'm trying to migrate my application to the 2.2 final version. I've just deleted the old references (v 2.2.0.525) and I've added the new ones (2.2.0.629). I can rebuild the application without any modifications. But when I try to run, my first layer (a custom one that inherits from the TiledMapServiceLayer) does not load the tiles. Something that you've changed broke this feature.

I've found a workaround. I've used the .NET Reflector tool to copy the code for the GetTileSource() method from the TiledMapServiceLayer. This method has not changed from the beta version to the final one. I override the GetTileSource() in my custom tile map layer and use the code that I've copied from the base class. If I run like that it won't work (expected!). But if I make a simple change, it works. I've changed from BitmapCreateOptions.DelayCreation to BitmapCreateOptions.None and magically it'll work! How about that?

After an investigation I saw that the addTiles() method from the TiledLayer class has changed from one version to another. Particularly, the way that you calculate the column. Do you have any clues? Should I log it as a bug?

Thank you!

André
0 Kudos
6 Replies
TorreyStevens
Emerging Contributor
I had the exact problem and solved it the exact way you mentioned.
0 Kudos
AndreMachado
Emerging Contributor
Yes, it seems that's the only way to workaround this problem. But after 1 month I still don't have any comments from someone from the ESRI team... that's worrying
0 Kudos
JenniferNery
Esri Regular Contributor
I apologize for the delayed response. I read this thread awhile back but was not aware of any issue in the TiledMapServiceLayer. Maybe you can share some code or reproducible sample with support so it can be evaluated and logged. Thanks.
0 Kudos
AndreMachado
Emerging Contributor
I apologize for the delayed response. I read this thread awhile back but was not aware of any issue in the TiledMapServiceLayer. Maybe you can share some code or reproducible sample with support so it can be evaluated and logged. Thanks.


Hello, thanks for the reply. So I've prepared a sample to demonstrate the problem. The sample is attached. It's a VS 2010 solution that contains a WPF app that uses a CustomTiledMapServiceLayer to load some tiles from a local directory. It works with the 2.2 BETA version but not with the new version (2.2 final). But if you uncomment the GetTileSource method (in the CustomTileMapLayer.cs) it'll work correctly on the 2.2 final version.

I hope that it demonstrates the problem. If you need anything else just let me know, ok?

Thank you,

Andre
0 Kudos
TorreyStevens
Emerging Contributor
Thanks Andre for making the demo, and yes this demonstrates the exact problem I have going from 2.2 beta to 2.2.
0 Kudos
AndreMachado
Emerging Contributor
Thanks Andre for making the demo, and yes this demonstrates the exact problem I have going from 2.2 beta to 2.2.


Unfortunately the problem is still present in the new version (2.3)!
0 Kudos