Displaying Image Overlay in ArcGIS Runtime

Geographic Information Systems Asked by Jai on December 24, 2020

TLDR; is there any way to display an image on a ArcGIS Runtime SceneView just like ImageOverlay, but without the use of ImageOverlay? (Long story in quotes)

I have an ArcGIS Runtime application written in WPF, which I need to
display a heatmap image. The image is calculated/generated on the fly,
and it’s in the form of raw byte array (i.e. not as a file). As the
user interact with the application, the heatmap is recalculated (i.e.
a new heatmap is generated to replace the old heatmap). The
application operates in both 2D and 3D (user can switch between the
two), which means the application must be able to show the heatmap in
both MapView and SceneView.

ArcGIS Runtime 100.8 comes with a new useful ImageOverlay feature
(though I’m using 100.9). I could get it to work in a SceneView.
The implement for the MapView is different, since ImageOverlay is
supported only for SceneView. It is implemented using the
GraphicOverlay, with an Envelope geometry and PictureFillSymbol
symbol. As the PictureFillSymbol was designed to work with any
geometry with "fill" (including Polygon), the image ended up
repeating in tile inside the geometry. I had to change the
PictureFillSymbol.ScaleX and PictureFillSymbol.ScaleY properties
whenever the mapview’s viewport (or scale) changes.

Subsequently, I realized that the application is crashing randomly
when I was navigating in a MapView. I made a new WPF project with a
basic MapView to duplicate the issue – it occurs randomly during map
zooming, with System.AccessViolationException:'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.' at
RuntimeCoreNet.GeneratedWrappers.CoreGeoView.CoreRT_GeoView_pulse(IntPtr thisHandle, IntPtr& outErrorHandle). I downgraded my SDK from 100.9
to 100.8 to see if there is similar problem. It generated errors in
100.8, but more types of exceptions are seen. As my previous SDK was at 100.6, I decided to test that, and it seems like the issue did not
happen at 100.6.

I had to roll back to 100.6, but ImageOverlay was introduced in
100.8. The method I used for MapView does not work in SceneView, because
it involves converting MapPoint of the Envelope‘s corners to screen Points
to calculate the rendered pixel size based on the geometry size on screen.
This will not work in a SceneView.

I’m trying to see if Raster and RasterLayer would work,
but my image is in byte[] form, with no georeferencing.

Is there other ways that I can implement my own ImageOverlay?

Add your own answers!

Related Questions

Creating cumulative friction map

1  Asked on April 9, 2021 by carter-rucker


Specifying pyproj lat and lon in radians

1  Asked on April 9, 2021 by omry-volk


adding line breaks to labels in ArcGIS Online

4  Asked on April 9, 2021 by zachary


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir