Select to view content in your preferred language

Raster Images Not Displaying

2742
0
08-02-2015 02:09 PM
PhilipCollier
Emerging Contributor

Having just started playing around with 10.2.6, i'm having a few issues with raster data.

I have been using the sample provided to add raster data to a map using localmapserver and the provided water-distribution-network.mpk with the sample data.  The rasters a have to test display fine using this MPK.

I have added extra functionality to this same to zoom to the extent of the last added raster (as a test), using the following,

      extent = (await layerRef.GetDetailsAsync(0)).Extent;

      await MyMapView.SetViewAsync(extent);

The extent return always has NaN for each value and the SetViewAsync throws as expected.

So I fired up ArcDesktop and created an Empty MPK with a blank group layer, and set the coordinate system to WGS84.  Now when I use this MPK rasters are not displayed at all.  However when I use the above code to zoom to the image, the view is set to where the image should have been (had it been displayed).

I think this is spatial reference related but can't be sure.  If anyone could shed some light on this I would be most grateful.  I have previously implemented zoom to raster functionality using a gpk package of the GetRasterProperties tool.  This is very long winded, I much prefer the SetViewAsync method.

Tags (1)
0 Kudos
0 Replies