ThinkGeo.com    |     Documentation    |     Premium Support

Re-projecting google layers on Android

initially we were re-projecting our feature data to the Google map espg, however when dealing with large volumes of vector data we were seeing considerable speed impacts – at least on the device we are using. From some aspects of our testing it appears that this re-projection of the data is a significant part of the speed impact.

In WPF Desktop Edition we set the ProjectionFromSphericalMercator projection in the GoogleMapLayer and everything works fine ( v9.0.208 – more recent versions have a memory overwrite issue).

When doing the same exact mechanism for Android (v 9.0.408) we get one of two different exceptions – either we get 'Object reference not set to an instance of an object" or depending on current zoon level “Convert Raster to Exsternal Projection by default is not implemented. please override this method if needed.”

The same error occurs for BingMapLayer as well, I did not test OpenSttreet.

I tried overriding the ConvertToExternalProjectionCore of ManagedProj4Projection – and I have come to the conclusion that I have no idea of how to do that correctly. I tried just converting the ImageExtents, but the result was not useable,

When the Ojbect Reference exception occurs ConvertToExternalProjectionCore is never called.

If this is not the correct method for re-projecting google maps on Android what is the correct way of doing so?

I just tested the override I did for ConvertToExternalProjectionCore on the WPF Desktop Edition, and it appears to function correctly there.

Hi Richard,

Sorry the delay to reply, but for Android and IOS edition, we don’t support reproject the raster layer like: Google layer, Bing layer, OSM layer or WorldMapKit layer.

And I think for Android or IOS edition, you should want to reproject your feature data into the projection of Google. I think maybe you can convert them into target projection and use the saved re-projected data.

Regards,

Don