ThinkGeo.com    |     Documentation    |     Premium Support

Null Reference Exception using WpfMap with ElementHost

Hi,

I am experimenting with using the WpfMap within a WinForms application. I downloaded the ThinkGeo sample that demonstrates how to use the ElementHost control and it worked fine. Then I updated to the latest NuGet packages and now there is a NullReferenceException in DrawCore of the WpfMap.

Stack Trace:
System.NullReferenceException: Object reference not set to an instance of an object.
at ThinkGeo.MapSuite.Wpf.WpfMap.91c=()
at ThinkGeo.MapSuite.Wpf.WpfMap.9Vc=(Overlay overlay)
at ThinkGeo.MapSuite.Wpf.WpfMap.U1U=(Overlay overlay, RectangleShape targetExtent, OverlayRefreshType overlayRefreshType, TimeSpan bufferTime, RequestDrawingBufferTimeType bufferTimeType)
at ThinkGeo.MapSuite.Wpf.WpfMap.gxk=(IEnumerable`1 drawingOverlays, RectangleShape targetExtent, OverlayRefreshType refreshType, TimeSpan bufferTime, RequestDrawingBufferTimeType bufferTimeType)
at ThinkGeo.MapSuite.Wpf.WpfMap.gxk=(RectangleShape targetExtent, OverlayRefreshType refreshType)
at ThinkGeo.MapSuite.Wpf.WpfMap.DrawCore(RectangleShape targetExtent, OverlayRefreshType overlayRefreshType)
at WpfInWinforms.CustomWpfMap.DrawCore(RectangleShape targetExtent, OverlayRefreshType overlayRefreshType) in C:\Users\steller\Documents\Visual Studio 2015\Projects\ThinkGeo\Wpf\WpfMapInWinformsProj\WpfInWinforms\CustomWpfMap.vb:line 8
Exception thrown: ‘System.NullReferenceException’ in ThinkGeo.MapSuite.Wpf.dll

Thanks!

Steve

Hi Setve,

That’s a bug, thanks to let us know it.

We had fixed it, please upgrade to latest version to make it works.

Any question please let us know.

Regards,

Ethan