Posts

Showing posts with the label Google Map clustering

Google Map Custom Clustering (Change Marker image and Cluster color)

Image
Many times in the development of the application it is required to customize the things. To make the UI look attractive we are changing the default component with the application color. So today, we are going to learn how to customize the cluster color and the marker. If you are not aware of what is clustering and how to use it you can check my previous blog .   So once you understand what is cluster and how to use in the application let's check how we can modify the cluster color etc. To do that we have to follow the basic steps. Let's start. Step 1)   First you need to create one class that extends the DefaultClusterRenderer<?> class. DefaultClusterRenderer<?> provides the different methods  that help us to modify the cluster and the markers. This method helps us to make the customization possible.    public class MediaExperienceCluster extends   DefaultClusterRenderer<SLocationInfo> { ...

Marker Clustering Android

Image
Google Map Clustering Android :- 

 
 Overview This example shows you how to use marker clusters to display a large number of markers on a map. The marker clustering is used when you have the large amount of data and you need to show it to the user. 

 The google marker clustering provides the better solution to show the large amount of data on the map.Depending upon the different zoom level the individual marker is shown to the user. 

 Add the following dependency to your app's gradle build file: 
    These library provides you re-clustering features and animation. 
         compile 'com.google.maps.android:android-maps-utils:0.5+' 


 Step 1)  You need to create your own model class and implement   the   interface ClusterItem . 
                    Cluster Item interface Override different method . 

 1.        ...