Open Max93 opened 11 years ago
Hey Max,
Yes. I plan to focus on documentation more after releasing version 1.4.
Will there be a documentation? Or even gradle-documentation for the new android studio build-system?
I cannot say when, but it will be. The wiki is open for modifications, so anyone can add info on features added by this library. For now the most useful documentation is the code of demo appliaction. And of course documentation on the Google Maps Android API v2, which this library is based on.
This is a great library, and I'm appreciative... the code for the demo application is great. But it's not even commented. I don't really know what ClusterSettings does, or how to use it. Digging into the code of the library is possible - but again, there's little no comments in the code. I'm left to copy and paste from the examples and use trial and error to sort things out. So much so, that I'm left wondering if it can even support what I need.
I'm sure you'd see more people use this if you had better documentation.
How can implement cluster click??
@Kintanpatel4393 Add OnMarkerClickListener
to GoogleMap
and check if Marker::isCluster
inside callback method.
Example in demo app: https://github.com/mg6maciej/android-maps-extensions/blob/master/android-maps-extensions-demo/src/main/java/pl/mg6/android/maps/extensions/demo/DeclusterificationExampleFragment.java#L49-L58
Is there any link to a simple example on how to set clustering setting in onMapReady method? More specifically, adding markers dinamically. Regards!
How can I set clustering settings to the map returned by onMapReady method if I cannot cast com.androidmapsextension.Googlemap into com.google.android.gms.GoogleMap it says those are not convertible types. So how can I implement the extension?
You need to use e.g. getExtendedMapAsync()
to get com.androidmapsextensions.GoogleMap
object. From that object, you can call like map.setClustering(settings)
to set clustering settings.
These is some examples in android-maps-extensions-demo
project, under this repo, like: https://github.com/mg6maciej/android-maps-extensions/blob/f9a733b5f3efc9f85f39d8db24dd3acc269d702b/android-maps-extensions-demo/src/main/java/pl/mg6/android/maps/extensions/demo/DemoFragment.java#L252
You need to use e.g.
getExtendedMapAsync()
to getcom.androidmapsextensions.GoogleMap
object. From that object, you can call likemap.setClustering(settings)
to set clustering settings.These is some examples in
android-maps-extensions-demo
project, under this repo, like:
getMapAsync()
returns a com.google.android.gms.GoogleMap object not com.androidmapsextensions.GoogleMap objet and both objects are inconvertible to one another
getMapAsync() returns a com.google.android.gms.GoogleMap object not com.androidmapsextensions.GoogleMap objet and both objects are inconvertible to one another
If you want to use this library, you can not use directly Google Maps (com.google.android.gms.GoogleMap
). If you use map fragment, it needs to come from com.androidmapsextensions.SupportMapFragment
, not from com.google.android.gms.maps.SupportMapFragment
. And to get the map object, you need to use the "extended getter" like getExtendedMapAsync()
.
getMapAsync() returns a com.google.android.gms.GoogleMap object not com.androidmapsextensions.GoogleMap objet and both objects are inconvertible to one another
If you want to use this library, you can not use directly Google Maps (
com.google.android.gms.GoogleMap
). If you use map fragment, it needs to come fromcom.androidmapsextensions.SupportMapFragment
, not fromcom.google.android.gms.maps.SupportMapFragment
. And to get the map object, you need to use the "extended getter" likegetExtendedMapAsync()
.
Ok thank you! Thats what I needed. So that means I cannot use ClusterManager anymore right? do I need to set up manually clusterization at a certain zoom lvl or is it automatic? Also if I need diferent info window adapters for cluster and for markers do i need to change adapter depending on what is clicked everytime?
hi, I can have a serious tutorial to use this extension ? thanks.