You are here: > ESRI Forums > arcgis server forums > Thread Replies

ArcGIS Server Forums

ArcGIS API for Silverlight forum

Map Data Not Yet Available   Klay Williams Mar 31, 2010
Re: Map Data Not Yet Available   Morten Nielsen Mar 31, 2010
Re: Map Data Not Yet Available   Klay Williams Mar 31, 2010
Re: Map Data Not Yet Available   Klay Williams Apr 02, 2010
Re: Map Data Not Yet Available   Klay Williams Apr 02, 2010
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Map Data Not Yet Available 
Author Klay Williams 
Date Mar 31, 2010 
Message Is there some way within the Silverlight API to detect when the map service is returning the no-data bitmap?

I'd like to show a solid dark color instead of the bright gray bitmap if no data is available.

I saw this message in the forums about the same issue, and was hoping Silverlight had similar functionality:

http://forums.esri.com/Thread.asp?c=158&f=2421&t=303099
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Map Data Not Yet Available 
Author Morten Nielsen 
Date Mar 31, 2010 
Message You could use a pixelshader effect on the layer to achieve a similar effect as what Dasa did in flex. One such shader is found here: http://code.msdn.microsoft.com/SL3ChromaKeyEffect 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Map Data Not Yet Available 
Author Klay Williams 
Date Mar 31, 2010 
Message My question is: which event on which object do I listen to?

From what I can gather of the Flex code, it appears I can listen to the Loaded event on the basemap layer. But do I then need to compare the pixels in the bitmap sent by the service to see if they match those in a local copy of the "Map Data not available" image? This seems like an ugly solution. It seems like it would be simple enough to set a flag on the response that indicates whether real data was sent or not.
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Map Data Not Yet Available 
Author Klay Williams 
Date Apr 02, 2010 
Message Anyone? Any answer to this? 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Map Data Not Yet Available 
Author Klay Williams 
Date Apr 02, 2010 
Message I guess I'll just keep postnig what I find here, in hopes that someone can shed some light on this.

Apparently, there is no Loaded event on the layer object in Silverlight. In fact, there are only three events that fire: Initialized, InitializationFailed, and PropertyChanged. PropertyChanged doesn't ever seem to fire, and the other two only fire when the map is first loaded, which doesn't help.