dhillworld

Exception from custom TiledLayer and AcceleratedLayersGroup

Discussion created by dhillworld on Dec 11, 2012
I have a custom TiledLayer that works fine when not accelerated, but in an accelerated map or in the accelerated layers group, I get an exception.  It seems to happen before it ever requests the first tile from the layer, during some sort of initialization process when first rendering the map. Does anyone at ESRI know what could be wrong with my TiledLayer's properties?  I compared my TileInfo to a TileInfo of an ArcGISLocalTiledLayer that works in accelerated mode, and the TileInfo, including LODs,  and spatial reference, etc.. are the same as far as I can see.  The FullExtent of my layer is the entire web mercator world, although I have tried limiting it to a smaller range of coordinates and that does not help.

Here is the stack trace that I get:

  [System.ArgumentException] "Value does not fall within the expected range."

   at ESRI.ArcGIS.Client.Runtime.NativeTileLayer..ctor(TiledLayer owner, RequestQueue queue)
   at ESRI.ArcGIS.Client.Runtime.NativeLayer.Create(Layer layer, RequestQueue queue)
   at ESRI.ArcGIS.Client.NativeMap.AddLayer(Int32 index, Layer layer)
   at ESRI.ArcGIS.Client.DrawingSurface.AddLayer(Int32 index, Layer layer)
   at ESRI.ArcGIS.Client.AcceleratedDisplayLayers.TryAddLayerToDrawSurface(Layer layer, Int32 index)
   at ESRI.ArcGIS.Client.AcceleratedDisplayLayers.Draw(Envelope extent, Double resolution, MapPoint canvasOrigin, Boolean useTransitions, Boolean isContinuous)
   at ESRI.ArcGIS.Client.Map.loadLayerInView(Boolean useTransitions, Envelope drawExtent, Layer layer, Boolean isContinuous, Double scale)
   at ESRI.ArcGIS.Client.Map.loadLayersInView(Boolean useTransitions, Envelope drawExtent)
   at ESRI.ArcGIS.Client.Map.Layers_LayersInitialized(Object sender, EventArgs args)
   at ESRI.ArcGIS.Client.Map.<>c__DisplayClass10.<Layers_LayersInitialized>b__e()

Outcomes