ThinkGeo.com    |     Documentation    |     Premium Support

OSM map display on Android appears to be off

Features are not displaying in the same location against Open street maps as they do in WPF and iOS. In my set up I am using the same SQLite database that contains osm waterways features and all platforms initialize the layers in the same fashion. iOS and WPF show the features directly over the rivers in the OSM backdrop. Android shows the features to the southeast of where they should be. Here is a wpf image

Here is the android display of the same area;

Using OpenStreetMap v11 beta011 – Map Suite v11 beta076 – basically all components are at the latest beta level as of 8/27/2018

Sorry spoke too soon aobut iOS – using OSM v11 beta09 the map display was identifcal to WPF – latest version puts texas north of Alaska.

Hi Richard,

Please try the sample which is based on beta version 011. It works well and the only change the zoomlevelset, please refer it.

9056.zip (104.7 KB)

This solution should works for both Android and IOS.

Regards,

Ethan

I have made changes based on the sample to our application. When I use OpenStreetMapOverlay and the CustomStyle for the mapView zoomLevelSet with our sample SQLite data the features show up exactly where they should against the OSM map. The display of our sample data and the osm overlay takes about 15 seconds.

I modified our code to use a regular overlay with the OpenStreetMapLayer – this allows us to use our own custom styles. However there are issues with this approach — when using the Layer as opposed to he overlay it takes a full minute for fully render the maps and our SQLite features. The drawing of the features is consistent, its the OSM maps that are much slower. The map display is also off but in a different direction. This would be our preferred implementation but the speed issue is a real show stopper.

Here is a image of the feature displacement –

Hi Richard,

In IOS and Android the OpenStreetMapOverlay and OpenStreetMapLayer have some different.

If the new solution can only works for OpenStreetMapOverlay, please try the previous solution for OpenStreetMapLayer. Incorrect position being shown with OSM on iOS

Please let us know whether it works for your scenario.

Regards,

Ethan

for our project we have a client and server application. The server is used to configure what features and how they are displayed on the client. Client side we are supporting WPF, iOS and Android the intent is to have them work in all the same fashion. On the client the intent is to have a custom zoom range where the maxed zoomed out range encompasses all of the features brought down from the server. WPF works perfectly for this I can set up an OpenStreetMapOverlay or OpenStreetLayer and use the custom zoom levels for the MapView. In android and iOS the only way I have been able to get OpenStreetMapOverlay to work is to use the OpenStreetZoomLevelSet for the MapView – the CustomStyle in the sample also works. Unfortunately this changes at what levels the features are displayed. The OpenStreetMapLayer works fine with our custom zoom levels for IOS and Android – but we have the speed issue and the displacement as noted previously.

As of right now I have not tested on iOS as I will not have access to my iOS build machine until tomorrow – I will let you know if the same issues are present there.

Hi Richard,

We tried to make everything goes just the same include API and behavior between different platform, but the IOS and Android still are special edition, they cannot totally equal the WPF edition.

So if you met any question please let us know.

Regards,

Ethan

I played around with a bit more today. It would appear the customZoomLevelSet as in the sample fixes the issue with OpenStreetMapOverlay for both iOS and Android – features appear exactly where they should. Maybe this is a different issue but in order to get and OSM maps to display I have to use the same zoom customZoomLevelSet for the main map.

With the OpenStreetMapLayer and CustomZoomLevelSet from the sample there is a discrepancy between the OSM map and features drawn to the map. However using the OpenStreetZoomLevelSet for the OSMLayer fixes that problem.

So at this point the only issue I really have is the speed in android. If I use the same zoomLevelSet for the OSMLayer and the map view the speed is almost as fast as using the OSMOverlay. Using a different zoom level set for the map view is apparently causing the speed problem.

The speed problem does not occur with iOS.

Attached is a android project that show the speed issue I am encountering – I removed the projects .mapsuitelicense file so that has to be added back in.
gettingStartedAndroid.zip (73.5 KB)

Hi Richard,

I think that should because the OS different between IOS and Android. Use different zoomlevelset will reduce performance, because it will introduce extra process to make the different zoomlevel works at the same time.

But we don’t have a solution for the reduced performance.

I think open cache should be helpful, and our future version should take more attention on the performance.

Regards,

Ethan