Skip to content
This repository was archived by the owner on Oct 9, 2022. It is now read-only.

Commit 4e516e9

Browse files
bug fixes and update readme
1 parent e5dc12a commit 4e516e9

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

README.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
[![Build Status](https://travis-ci.org/aminyazdanpanah/google-maps-android-charts.svg?branch=master)](https://travis-ci.org/aminyazdanpanah/google-maps-android-charts)
44
[![](https://jitpack.io/v/aminyazdanpanah/google-maps-android-charts.svg)](https://jitpack.io/#aminyazdanpanah/google-maps-android-charts)
55

6-
A Google Maps Android library to render marker clusters as charts categorized on map with specified values.
6+
A Google Maps Android library to render marker clusters as charts categorized on the Google Maps Android with specified values.
7+
78
Available Charts: [Pie Chart](#pie-chart), [Bar Chart](#bar-chart) and [Donut Chart](#donut-chart)
89

910
![Demo](/docs/demo.gif?raw=true "Demo")
@@ -19,26 +20,23 @@ repositories {
1920
2. Add a dependency to your build.gradle:
2021
```groovy
2122
dependencies {
22-
compile ''
23+
implementation 'com.aminyazdanpanah:google-maps-android-charts:1.3'
2324
}
2425
```
2526

2627
## Usage
2728

28-
This library is a wrapper around "[Google Maps Android API utility library](https://github.com/googlemaps/android-maps-utils)". So you need to implement `com.google.maps.android:android-maps-utils:0.5+` and `com.google.android.gms:play-services-maps:16.1.0` in your build dependencies.
29-
30-
Before using this library, please read the "[Google Maps Android API utility library documentation](https://developers.google.com/maps/documentation/android-sdk/utility/)" .
29+
This library is a wrapper around "[Google Maps Android API utility library](https://github.com/googlemaps/android-maps-utils)" and renderer marker cluster as charts on th Google Maps. You need to implement `com.google.maps.android:android-maps-utils:0.5+` and `com.google.android.gms:play-services-maps:16.1.0` in your build.gradle dependencies.
3130

32-
You can see the demo for more details.
31+
- **NOTE:** Before using this library, please read the "[Google Maps Android API utility library documentation](https://developers.google.com/maps/documentation/android-sdk/utility/)" .
3332

34-
NOTE:
33+
- **NOTE:** Before Building the demo, you must [get an API key](https://developers.google.com/maps/documentation/android-sdk/signup) which you can then add to your demo app.
3534

36-
- Before Building the demo, you must [get an API key](https://developers.google.com/maps/documentation/android-sdk/signup) which you can then add to your demo app.
3735

3836
### Marker
3937

40-
Firstly, you need to generate markers that have a name.
41-
You must initialize `CMaker` class that is implemented `ClusterItem` and pass the LarLng, the name of marker and the drawable Id. Also you can set the title and snippet of marker.
38+
First, you need to generate markers that have a name.
39+
You must initialize `CMaker` class that is implemented by `ClusterItem` and pass the LarLng, the name of marker and the drawable Id. Also you can set the title and snippet of the marker.
4240

4341
```java
4442

@@ -61,7 +59,7 @@ clusterManager.addItem(marker2);
6159

6260
### Chart
6361

64-
This library uses the the name to calculate the values of charts. In face, the number of each slice of chart is sum of names.
62+
This library uses the the name to calculate the values of charts. In face, the number of each slice of chart is sum of marker's name.
6563
Also you must set the names of markers and the colors you would like to render. The length of names array must be the same as length of colors array.
6664
```java
6765

@@ -101,6 +99,18 @@ At the end, you must pass `chart` object to `setRenderer` method in `ClusterMana
10199
clusterManager.setRenderer(chart);
102100
```
103101

102+
### Customize Values
103+
104+
You can customize the values of chart by extending `ChartRenderer` class and override the `values` method:
105+
106+
```java
107+
class customPieChartRenderer extends PieChartRenderer {
108+
@Override
109+
float[] values(Cluster<CMarker> cluster){
110+
// Return any value
111+
}
112+
}
113+
```
104114
## Contributing
105115

106116
I'd love your help in improving, correcting, adding to the specification.

library/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
22
apply plugin: 'com.novoda.bintray-release'
33

44
publish {
5-
userOrg = 'yazdanpanah'
5+
userOrg = 'aminyazdanpanah'
66
groupId = 'com.aminyazdanpanah'
77
artifactId = 'google-maps-android-charts'
88
publishVersion = '1.3'

0 commit comments

Comments
 (0)