ThinkGeo.com    |     Documentation    |     Premium Support

DotDensityStyle not drawing after CloneDeep

A while back we mentioned a bug that we found when we were serializing the DotDensityStyle.  At that time it would serialize into a huge file.  I am pretty sure that was because the cached points were being serialized with the style. 


Well, now I have found a new bug that I believe is related.  When I serialize a DotDensityStyle and deserialize it my self or use CloneDeep()  (which does the same thing I believe) the style no longer draws on my maps.


I have noticed a new property in the DotDensityStyle called CachedPoints.  The documentation I have does not mention this property so I am not sure if I am using it incorrectly.  I have been watching it while I clone the style.  The original style will have a few hundred CachedPoints and the clone's CachedPoints is null.  That makes sense because I know we do not want to serialize all the points.  However when the cloned style draws it should recreate those CachedPoints but it is not. The cloned style's CachedPoints remain null.



Aaryn, 
  
 Thanks for pointing this out. The cloned style should recreate the CachedPoints when it was drawn but it doesn’t actually, which cause the exception. This is a bug when adding the property CachedPoints NonSerialized. We have added it to our tracking system and will fix it in the upcoming version which will be released around next week. Sorry for the inconvenience for now. 
  
 Thanks 
 ThinkGeo Support 


Lee, 
  
 Thank you.  It is a only a minor inconvenience.  Thank you very much for your time.  I will forward to the next release.

Aaryn, 
  
 You are welcome; please let us know anything else you run into. 
  
 ThinkGeo Support 


Aaryn, 
  
   The CachedPoints property was added by request of another user because he wanted to serialize the style and then wanted to save the point data somewhere else.  This way the binary for the object model was small and I think we put the points in SQL server because it was a map they used frequently and the data didn’t change much.  Of course this is what happens when we add something on the sly, it wasn’t unit tested well enough and documented.  Two steps forward, one step back… 
  
 David

Thank you the latest dll fixed this issue.

Good news. Let us know anything else you run into. 
  
 Thanks, 
 ThinkGeo Support