Android Map Clustering Using Polaris 2 - android

I'm making an app for android and I'm using an android map to show about 15k markers from a WebService, the map gets really slow, I have searched around and find a solution "Clustering" but I can't implement it in my app, my map is running with the lib "Polaris 2" and I tried "ClusterKraf", but I had no results.
If someone has a better way to show the markers or some way to make clustering please help me.

I have been using Android Map Extensions and Clusterkraf, but finally decided implement the clustering by my self. The clustering could be written in a very simple way and you could get more control in how the elements are showing in the map, etc.
You can read my implementation of clustering in http://arnaldog.wordpress.com/2013/07/31/simple-clustering-with-android-maps-v2/.
I hope that helps you.

Polaris 2 does not have clustering implemented.
Both Clusterkraf and Android Maps Extensions mentioned by iaindownie have demo app on Google Play, which are also open source, so you can download the code from their project sites to try working solution. Then you can copy relevant code into your project.

Related

How to use openstreet map in iOS with custom map Server, Swift any Libraray?

We have our own open street map server which is maintain by our company. for both Android and iOS we are planning to use this Map Server which is like
"http://maps.mycompanyname.com/osmtiles/15/23655/15748.png."
For Android they have amazing osmdroid for all displaying, routing and all those things. it works perfectly. But for iOS we couldn't find a such library. we are trying to do this with MKMapView with custom tiles, but doesn't success.
Features love to have,
show any given location with markers.
show multiple marker points.
navigation support (optional)
Hope any Guidance for this from you. Please help me with this.
It's some years since I've done it, but can't you still have a webview within an iOS app and have e.g. Leaflet in there? That can definitely display the tiles you're interested in.

Map looks overcrowded when restaurants are close to each other

I am working on building an app with a map function. We have parsed restaurants from Google Places and put them on Apple Maps for iOS and Google Maps for Android.
Our main problem is that the map looks very crowded when restaurants happen to be close to each other. See example here: http://picpaste.com/MAP_EXAMPLE-P17m5Aqe.png
We can't figure out a good solution for this. Google/Apple seem to have solved it by showing different restaurants depending on the level of zoom. Is there an easy way to replicate the algorithm?
Update: We have tried clustering but it does not really solve the issue when you zoom in enough (as picture above shows).
Thank you for your help!!
You should use clustering here. There is already an official utility implementation of maps marker clustering here.

Offline map (.obf file) in android?

I want to include a MapView in my Application. I have been playing around with the Google Api a bit and it worked quite well.
But now I want to have a map completely offline. I know there are a lot of possibilities to do this.
The problem is that I have maps with .obf extension not zip. It should be possible to zoom in and out and to set markers at specific locations.
I know that there are things like Osmdroid. But I can't find any tutorial to load .obf file.
Thank you in advance.
I suggest you to have a look at OsmAnd.
It works with .obf format and provides you offline navigation.
OsmAnd

Android - Regroup Google Map Markers

On my Android App, I've got a map with a lot of markers.
But when the user is zooming out, it hard the see the differents markers.
So I want to regroup then in one when there are a two much markers.
Could you help me please ?
Thanks
Try one of the open source clustering libraries for Google Maps Android API v2: Android Maps Extensions (demo here) or Clusterkraf (demo here).
For who is having troubles with Clusterkraf (I can't make it work!) and for who can't use android-maps-extension cause it's shipped with a custom build of Play Services lib, I want to suggest this other library, that is tiny, well written and works out of the box:
Clusterer: https://github.com/mrmans0n/clusterer
After a whole morning spent trying using the other two libs, this one saved my day!

Too many markers Google Maps

We added about 200 new markers in the MapView.
Now the app stucks and you cant use the MapView.
I heared about MarkerClusterer but did not found any more inforamation how to use MarkerClusterer with Android...or are there better solutions?
Can anyone give me a link or write a little turorial?
Thanks :)
You can have a look at this example Android project https://github.com/igorab/ManyPinsProject
It shows limited amount of markers depending on MapView zoom level.
Here is tutorial from Google https://developers.google.com/maps/articles/toomanymarkers
As #CommonsWare said it is only for JavaScript version or GoogleMaps, but may be you can find something useful there. For example, they have a link to MarkerClusterer js source code. Maybe you can find a way to adopt it to Android.
You can use this library – Android MapView Balloons. This project provides an easy way to annotate map overlay items with a simple information balloon when using the Android Maps.

Categories

Resources