posm / OpenMapKitAndroid

http://openmapkit.org
BSD 3-Clause "New" or "Revised" License
128 stars 38 forks source link

Performance issues with POIs #108

Closed PaulUithol closed 8 years ago

PaulUithol commented 8 years ago

While I've seen OMK do well with large amounts of buildings (samples for Senegal and Ushirombo, as well as data for Kampala), performance with POIs seems to be quite a lot worse. The linked file contains about 3000 POIs and is very hard to handle; the couple of examples I've seen with buildings contain 30000+ and perform fine. Loading the layer can take a minute or so on a Samsung S3 mini; then actually panning and selecting a POI is difficult at best.

Is there any way this could be improved?

(POI file: https://drive.google.com/open?id=0B5Dz5S5pvz_TMERCZlpMTUR4TkU)

hallahan commented 8 years ago

This issue is complex in nature. Basically, the underlying map renderer is the deprecated Mapbox Android SDK, now called mapbox-android-sdk-legacy.

The polygons are performing well, because I built my own geometry engine from scratch, since what came with the SDK was not performant. The POI markers, however, rely on some core parts of the SDK that could not be rewritten. We could look at this, but it would be in vain, because we plan on switching to a new renderer: either MapboxGL Native or AmigoClient.

jharpster commented 8 years ago

We've been waiting for a fix from MapBox on the GL renderer that we need before we can abandon the deprecated library. The issue can be referenced here: https://github.com/mapbox/mapbox-gl-native/issues/352

hallahan commented 8 years ago

This will not be solvable with the current mapping library :-1:

We would need a GL library, which this is not...

Since we are honing in the workflow to have a given OSM file to encompass the bounds of a field papers atlas, we never really will have 3000 POIs on the map.

If you would like to continue doing manual deployments, I'd suggest having OSM files encompass a smaller area so you don't have such a high number of POIs. Then, just activate the layer in question for the area you are surveying.

Sorry :disappointed: