mg6maciej / android-maps-extensions

Android Maps Extensions is a library extending capabilities of Google Maps Android API v2.
405 stars 101 forks source link

Documentation / wiki / cookbook required ! #2

Open Max93 opened 11 years ago

Max93 commented 11 years ago

hi, I can have a serious tutorial to use this extension ? thanks.

mg6maciej commented 11 years ago

Hey Max,

Yes. I plan to focus on documentation more after releasing version 1.4.

kartheininger commented 11 years ago

Will there be a documentation? Or even gradle-documentation for the new android studio build-system?

mg6maciej commented 11 years ago

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.

mandrachek commented 10 years ago

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.

kintanpatel commented 7 years ago

How can implement cluster click??

mg6maciej commented 7 years ago

@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

Psibot4 commented 5 years ago

Is there any link to a simple example on how to set clustering setting in onMapReady method? More specifically, adding markers dinamically. Regards!

Psibot4 commented 5 years ago

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?

hannta commented 5 years ago

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

Psibot4 commented 5 years ago

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

getMapAsync() returns a com.google.android.gms.GoogleMap object not com.androidmapsextensions.GoogleMap objet and both objects are inconvertible to one another

hannta commented 5 years ago

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().

Psibot4 commented 5 years ago

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().

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?