All Projects → sharewire → Google Maps Clustering

sharewire / Google Maps Clustering

Licence: apache-2.0
Fast marker clustering library for Google Maps Android API.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Google Maps Clustering

js-markerclusterer
Create and manage clusters for large amounts of markers
Stars: ✭ 92 (-66.67%)
Mutual labels:  clustering, google-maps
react-google-static
🌍 A React wrapper for Google Static Maps API.
Stars: ✭ 37 (-86.59%)
Mutual labels:  google-maps
hopOn
A car rental flutter application using firebase and google maps API
Stars: ✭ 68 (-75.36%)
Mutual labels:  google-maps
micca
micca - MICrobial Community Analysis
Stars: ✭ 19 (-93.12%)
Mutual labels:  clustering
ML2017FALL
Machine Learning (EE 5184) in NTU
Stars: ✭ 66 (-76.09%)
Mutual labels:  clustering
dti-clustering
(NeurIPS 2020 oral) Code for "Deep Transformation-Invariant Clustering" paper
Stars: ✭ 60 (-78.26%)
Mutual labels:  clustering
EasyWayLocation
This library contain all utils related to google location. like, getting lat or long, Address and Location Setting dialog, many more...
Stars: ✭ 142 (-48.55%)
Mutual labels:  google-maps
L2c
Learning to Cluster. A deep clustering strategy.
Stars: ✭ 262 (-5.07%)
Mutual labels:  clustering
k8s-openresty-streaming
Full-fledged media streaming server with OpenResty and rtmp module
Stars: ✭ 37 (-86.59%)
Mutual labels:  clustering
watset-java
An implementation of the Watset clustering algorithm in Java.
Stars: ✭ 24 (-91.3%)
Mutual labels:  clustering
Firebase-Realtime-Car-Moving-On-JavaScript-Google-Maps
This is the solution for moving realtime cars on Google Maps JavaScript using Google Firebase Realtime Database.
Stars: ✭ 26 (-90.58%)
Mutual labels:  google-maps
ionic3-google-maps-examples
Some examples of how to use google maps javascript API on a Ionic application and use HTML5 geolocation.
Stars: ✭ 24 (-91.3%)
Mutual labels:  google-maps
openapi-specification
OpenAPI specification for Google Maps Platform API
Stars: ✭ 27 (-90.22%)
Mutual labels:  google-maps
MVGL
TCyb 2018: Graph learning for multiview clustering
Stars: ✭ 26 (-90.58%)
Mutual labels:  clustering
NNS
Nonlinear Nonparametric Statistics
Stars: ✭ 26 (-90.58%)
Mutual labels:  clustering
scrapyr
a simple & tiny scrapy clustering solution, considered a drop-in replacement for scrapyd
Stars: ✭ 50 (-81.88%)
Mutual labels:  clustering
TEXTOIR
TEXTOIR is a flexible toolkit for open intent detection and discovery. (ACL 2021)
Stars: ✭ 31 (-88.77%)
Mutual labels:  clustering
polylineencoder
A C++ implementation of Google Encoded Polyline Algorithm Format (encoder/decoder)
Stars: ✭ 15 (-94.57%)
Mutual labels:  google-maps
Dagsfm
Distributed and Graph-based Structure from Motion
Stars: ✭ 269 (-2.54%)
Mutual labels:  clustering
Mongodb consistent backup
A tool for performing consistent backups of MongoDB Clusters or Replica Sets
Stars: ✭ 255 (-7.61%)
Mutual labels:  clustering

Google Maps Clustering for Android

Download Android Arsenal

A fast marker clustering library for Google Maps Android API.

Demo

Motivation

Why not use Google Maps Android API Utility Library? Because it's very slow for large amounts of markers, which causes skipping frames and ANRs (see Issue #29, Issue #82). But this library can easily handle thousands of markers (the video above demonstrates the sample application with 20 000 markers running on Nexus 5).

Installation

  1. Make sure you have JCenter in your repository list:
repositories {
    jcenter()
}
  1. Add a dependency to your build.gradle:
dependencies {
    compile 'net.sharewire:google-maps-clustering:0.1.3'
}

Integration

  1. Implement ClusterItem to represent a marker on the map. The cluster item returns the position of the marker and an optional title or snippet:
class SampleClusterItem implements ClusterItem {

    private final LatLng location;

    SampleClusterItem(@NonNull LatLng location) {
        this.location = location;
    }

    @Override
    public double getLatitude() {
        return location.latitude;
    }

    @Override
    public double getLongitude() {
        return location.longitude;
    }

    @Nullable
    @Override
    public String getTitle() {
        return null;
    }

    @Nullable
    @Override
    public String getSnippet() {
        return null;
    }
}
  1. Create an instance of ClusterManager and set it as a camera idle listener using GoogleMap.setOnCameraIdleListener(...):
ClusterManager<SampleClusterItem> clusterManager = new ClusterManager<>(context, googleMap);
googleMap.setOnCameraIdleListener(clusterManager);
  1. To add a callback that's invoked when a cluster or a cluster item is clicked, use ClusterManager.setCallbacks(...):
clusterManager.setCallbacks(new ClusterManager.Callbacks<SampleClusterItem>() {
            @Override
            public boolean onClusterClick(@NonNull Cluster<SampleClusterItem> cluster) {
                Log.d(TAG, "onClusterClick");
                return false;
            }

            @Override
            public boolean onClusterItemClick(@NonNull SampleClusterItem clusterItem) {
                Log.d(TAG, "onClusterItemClick");
                return false;
            }
        });
  1. To customize the icons create an instance of IconGenerator and set it using ClusterManager.setIconGenerator(...). You can also use the default implementation DefaultIconGenerator and customize the style of icons using DefaultIconGenerator.setIconStyle(...).

  2. Populate ClusterManager with items using ClusterManager.setItems(...):

List<SampleClusterItem> clusterItems = generateSampleClusterItems();
clusterManager.setItems(clusterItems);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].