Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

marker cluster sumatory of markers label #1

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

vlodosmonkey
Copy link

Pull request guide

Thank you for considering to improve this cordova-plugin-googlemaps.

When you create a pull request, please make it to multiple_maps branch instead of master branch.

Because the multiple_maps branch is edge version.

Thank you for your understanding.

var countCluster = 0;
cluster._markerArray.forEach(function (marker) {
var data = marker.get('data');
if (data && data.data && data.data.operative == 'ECHARGE') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Le pondria algo mas generico. Algo como

if (data && data.data && data.data.sumLabel) {
countCluster += data.data.label;
} else {
countCluster += 1;
}

Al meter el else ya no te hace falta el if de la linea 966

MarkerCluster.prototype.getClusterLabelData = function (self, data, key) {
var self = self;
var index = key.indexOf(".");
var firstPart = null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cambiar la manera de acceder por esta manera, con un comentario a este enlace:

https://stackoverflow.com/questions/8051975/access-object-child-properties-using-a-dot-notation-string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants