Tuesday, May 19, 2009

Black areas in Silverlight Map Control using GeoWebCache


Strange behavior in Silverlight map control (SMC).


This blog from Randy George shows how to use GeoServer GeoWebcached layers in the Silverlight map control:




Very nice, works well. I used this syntax for my Tile Source




which pulls tiles from the GeoWebCache.


Problem is, some of our layers have a smaller coverage area than others. GeoWebCache is smart enough to not try to generate tiles if the layer doesn't cover the area. Problem is, that the SMC shows a tile that doesn't return data as BLACK. Very ugly - see picture.
So, how to fix? Likely this is a bug in the SMC, so it needs to be fixed there. But in the meantime, you can change the extents of your GeoServer layer to be larger. Then, reload the GeoWebCache by going to the http://yourserver:8080/geoserver/gwc/demo and clicking on "Reload Configuration" - or possibly restarting GeoServer, I didn't try that.
Then GWC will send back transparent PNGs instead of nothing at all, and the SMC is happy.





No comments: