Open rcpinheiro opened 4 years ago
Could you show me the screenshot? (I'm outside now)
Ah, I got your idea.
You want to show the value of markers
instead of number of markers
.
Right. Three markers with "number" equal to 48, 11 and 2:
When you zoom out:
On second thought, the name "number" is not a good one. It's best to call it "value" or "weight".
@rcpinheiro
Thank you for your PR. Your idea is good, but creating a special meaning property for particular is not good.
Because some people might want to more complex calculation, such as return value * priority;
I also asked someone wanted to customize the strings of the number, such as 2532 -> 2.5k
So, I will create a custom callback instead of particular property.
When you add markers to MarkerCluster add a optional "number" parameter to the MarkerOptions (default: number=1). That way, MarkerCluster instead of showing the count of Markers, will show the sum of the "number" field in the Markers. Very useful when you try to add lots and lots of identifical markes. For instance, if you have 100 markers in the same location, you only have to add one marker with "number=100" instead of adding 100 markers.
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.