ThinkGeo.com    |     Documentation    |     Premium Support

Unable to apply projection to OpenStreetMapOverlay

In my WPF app, when attempting to apply a projection to the OpenStreetMapOverlay I get the following error message:

I was able to replicate this in the DisplayOpenStreetMapOverlaySample of the HowDoI sample app with the following code.

osmMapsOverlay.ProjectionConverterFromServerProjection = new ProjectionConverter(
       Projection.GetGoogleMapProjString(),
       Projection.GetProjStringByEpsgSrid(3348));

osmMapsOverlay.ProjectionConverterFromServerProjection.Open();

Cheers,
John

Hi John,

Did you try to install ThinkGeo.UnmanagedProj via nuget?

Thanks,
Leo

Hi Leo,

I’ve tried this on the HowDoI example WPF app with version 12.3.10 of ThinkGeo.UnmanagedProj.
I also tried updating all the packages included in the example app to the latest beta versions but the issue was still present.

Thanks,
John

Hi John,

We need to use UnmanagedProjectionConverter, and ThinkGeo.Dependency.Gdal is required also.

osmMapsOverlay.ProjectionConverterFromServerProjection = new UnmanagedProjectionConverter(
        Projection.GetGoogleMapProjString(),
        Projection.GetProjStringByEpsgSrid(3348));

Here’s a sample, feel free to download and play around with it.
WpfApp1.zip (10.5 KB)

Thanks,
Leo