ThinkGeo.com    |     Documentation    |     Premium Support

Exception when adding markerOverlay

ThinkGeo UI for WPF .Net Core

Exception at
InitializeComponent();
WindowState = WindowState.Maximized;
SimpleMarkerOverlay markerOverlay = new SimpleMarkerOverlay();
markerOverlay.DragMode = MarkerDragMode.Drag;
markerOverlay.MarkerDragged += MarkerOverlay_MarkerDragged;
map.Overlays.Add(“MarkerOverlay”, markerOverlay);

This exception was originally thrown at this call stack:
ThinkGeo.UI.Wpf.MapView.t1k=(object, ThinkGeo.Core.AddedGeoCollectionEventArgs)
ThinkGeo.Core.GeoCollection.OnAdded(ThinkGeo.Core.AddedGeoCollectionEventArgs)
ThinkGeo.Core.GeoCollection.Add(string, T)
WPFCoreMapOnly.MainWindow.MainWindow() in MainWindow.xaml.cs

Hi Liang_Lu,

I tried your code in our sample, but it looks works well.

Here is the sample: https://github.com/ThinkGeo/QuickstartSample-forWpf.NetCore

If you still met this problem, could you please modify the sample code to reproduce it and upload here?

Regards,

Ethan

Hi Ethan,

I changed my code based on the sample you gave. I can see the map now.

Yet on some zoom levels, I see “One or more errors occurred (The parameter you supplied may not be null. (Parameter ‘text’))” . I think it is due to json file.

It seems that the json file in the sample file for .net core is different than that in the sample file for .net framework. Why is the difference for the same mbtiles map file? Do you have a jason file that works for all zoom levels?

Thanks,

Liang

Hi Liang_Lu,

In fact the .net framework version and .net core version is totally different version. The code is totally new for .net core, so even they render the same type but the logic is different, and the sample file should be also different.

If you met the exception could you please let us know where is the Json file you mentioned? Because it looks in the sample QuickstartSample-forWpf.NetCore it don’t contains a Json file.

If you want to find more samples you can search in our sample list: https://github.com/thinkgeo

Regards,

Ethan

Hi Liang_Lu,

Our developer make sure the style json for .net framework and .net core is different, many tags are not the same. We suggest you choose .net core version if you want to use it because we will keep improve this version.

You can find the .net core style json here: https://github.com/ThinkGeo/HowDoISamples-ForWPF.NETCore/tree/master/WpfSamples-HowDoI/SampleData/Json

And we hadn’t reproduced the exception you mentioned “One or more errors occurred (The parameter you supplied may not be null. (Parameter ‘text’))”.

Please let us know how to reproduce it, we need the product name, dlls detail version, the bounding box(current extent) about it, so we can reproduce it and solve it.

Here is the test video.

9670.zip (2.1 MB)

Regards,

Ethan

Hi Ethan,

the JSON file I picked up for .NET Core is from the sample for MBTileExtractorSample-ForWpf.NetCore.

Thanks,

Liang

Hi Liang_Lu,

Do you means you get the Json file from MBTileExtractorSample-ForWpf.NetCore and it met the exception when you tried to use it in QuickstartSample-forWpf.NetCore?

If so could you please upload the sample you modified so we can see where is the problem.

Regards,

Ethan

Hi Ethan,
With the JSON Files https://github.com/ThinkGeo/HowDoISamples-ForWPF.NETCore/tree/master/WpfSamples-HowDoI/SampleData/Json, at Zoomlevel 20 I saw the errors " One or more errors occurred (The parameter you supplied may not be null. (Parameter ‘text’))”.
Extent is {-9181424.24616341,3247791.5481563155,-9181137.607308932,3247639.719138085}.
My project is uploaded to https://onedrive.live.com/?id=903C2C2A5A4624B!115&cid=0903C2C2A5A4624B
MBtiles used is Tampa3.mbtiles. Tampa3.mbtiles was generated using worldstreets.mbtiles we bought using Extractor for .NET framework, it can be found at the same onedrive link.
The Extractor for .NET core seems to be in an infinite loop once I pick an area. (Can you make sure it picked up all the fixes? I remember I saw the same issues with Extractor for .NET framework.)

Thanks,

Liang

Hi Liang_Lu,

It looks your share link expired, could you please update it?

We will look into your problem after try it.

Regards,

Ethan

Ethan,

Please try https://1drv.ms/u/s!AktipKXCwgMJc41-kLfnG8Eado0?e=lG4bjx

Project is WPFCoreMapOnly.zip.
Thanks,

Liang

Hi Liang_Lu,

We get it, our developer will look into it.

Regards,

Ethan

Hi Liang Lu,

Attached is the updated style json file, cover the same Json file in your project can solve the exception.

Json.zip (20.6 KB)

Regards,

Don