ThinkGeo.com    |     Documentation    |     Premium Support

Wpf OpenStreetMapOverlay not showing

Hi

I’m in a process of evaluating your product regarding wpf support for Open Street map, Google maps and Bing using C#.

I must say that your documentation in this regards is very limited. I can’t find any real eksamples for using Open Street map, Google maps or Bing even though it is claimed on this page that is should be posible.

I have tried with this code for Open Street map but no map is showing only some icons looking like a way to close somthing.

Map1.MapUnit = GeographyUnit.Meter;
OpenStreetMapOverlay openStreetMapOverlay = new OpenStreetMapOverlay();
Map1.Overlays.Add(“OpenStreetMap”, openStreetMapOverlay);
Map1.CurrentExtent = new RectangleShape(-620000, 6720000, 870000, 5120000);
Map1.Refresh();

I can access openstreetmap.org with no problems.

Please provide a real eksampel including the using statments at the top.

Hi Martin,

You can view our samples here: https://github.com/ThinkGeo, and we have a sample for it https://github.com/ThinkGeo/OpenStreetMapSample-ForWinForms, it’s based on winforms, but the API is just the same as WPF.

You can also view our wiki for detail information about the product here: http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf

And as below is a simple sample for view OSM in WPF:
8917.zip (9.8 KB)

Wish that’s helpful.

Regards,

Ethan