millicandavid

Options for Raster Graphics in 100.x

Discussion created by millicandavid on Jan 9, 2019
Latest reply on Jan 14, 2019 by millicandavid

In 10.2.7 our application accomplished some of our features by extending DynamicMapServiceLayer. It seems that all Layers and Overlays are sealed in 100.x so I'm trying to figure out how to do the same thing that we were doing. So we allow the user to selectively add their data to the map and there could be hundreds of these things to choose from and we dynamically generate the image in the user session as the underlying data can change. And the data is somewhat complex(fairly large matrices). These custom layers are caching the images for performance reasons. The user can toggle visibility of these images in real time once they have been loaded. But basically we extended DynamicMapServiceLayer and override DrawInScreenCoordinates so that we can use the DrawingContext to draw our custom images on the screen. We also override GetImageUriAsync and fake a service call while we are really generating the images locally in the application. I can't see a way to achieve the same level of flexibility given the 100.x framework and how every class seems to be sealed and not extensible.  

 

I read about GraphicsOverlays which seem to be limited to simple geometry which is great for some of my data but not the scenario that I presented above. I also read about RasterLayers but they seem pretty limited as well. You can create one with a file reference would be too slow for my use. RasterFunction seemed like a promising option but it is sealed as well. Would mocking an ImageRasterService work perhaps? Any other options that I'm not considering?

 

Thanks for any input that anyone may have.

Outcomes