HeatMap null object reference

2337
1
11-22-2013 11:45 AM
Labels (1)
ClayGinn
New Contributor II
I"m trying to use the heat map and keep receiving this error when I make the layer visible.
System.NullReferenceException was caught
  HResult=-2147467261
  Message=Object reference not set to an instance of an object.
  Source=ESRI.ArcGIS.Client.Toolkit.DataSources
  StackTrace:
       at ESRI.ArcGIS.Client.Toolkit.DataSources.HeatMapLayer.GetSource(Envelope extent, Int32 width, Int32 height, OnImageComplete onComplete)
       at ESRI.ArcGIS.Client.DynamicLayer.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.layer_OnLayerChanged(Object sender, EventArgs args)
       at ESRI.ArcGIS.Client.Layer.OnLayerChanged()
       at ESRI.ArcGIS.Client.Toolkit.DataSources.HeatMapLayer.heatMapPoints_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at ESRI.ArcGIS.Client.Geometry.PointCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
       at System.Collections.ObjectModel.Collection`1.Add(T item)
       at ICSnet.Windows.Controls.ArcGIS.RuntimeMap.PlotCrimeAnalysis(Object sender, PlotCrimeAnalysisEventArgs e)
  InnerException: 


Everything I've done is standard, straight from the Runtime SDK HeatMap example. The only difference I have is that instead of filling it with 1000 bogus points I'm using actual data from our database. Any ideas?
0 Kudos
1 Reply
MichaelBranscomb
Esri Frequent Contributor
Hi,

Please can you post a small, self-contained reproducer app? That will greatly help us figure out what the issue might be.

Cheers

Mike
0 Kudos