Comments (6)
Hi,
I found out! Just return "false" in:
-
(BOOL)mapView:(TSClusterMapView *)mapView shouldForceSplitClusterAnnotation:(ADClusterAnnotation *)clusterAnnotation;
Thank you!!
from tsclustermapview.
Hi,
If possible I would to suggest a little modification. If there are a lot of places very close to each other, with another places with exactly the same coordinates, the algorithm not call the method below:
-(BOOL)mapView:(TSClusterMapView *)mapView shouldForceSplitClusterAnnotation:(ADClusterAnnotation *)clusterAnnotation;
Debugging the code, I find out the reason. Because the method is only called when the groupedRounded annotations count is equal to 1:
//...TSClusterMapView class, in "splitClusterToOriginal:clusterAnnotation" method
NSDictionary *groupedRoundedLatLonAnnotations = [TSClusterOperation groupAnnotationsByLocationValue:[NSSet setWithArray:clusterAnnotation.cluster.originalAnnotations]];
//Here the condition
if (groupedRoundedLatLonAnnotations.allKeys.count == 1) {
if ([_clusterDelegate respondsToSelector:@selector(mapView:shouldForceSplitClusterAnnotation:)]) {
if (![_clusterDelegate mapView:self shouldForceSplitClusterAnnotation:clusterAnnotation]) {
return;
}
}
}
Maybe this condition can be parameterized (count value). In my case, for example, I don't need this condition.
Please correct me if I am wrong.
Thank you very much!
from tsclustermapview.
@pcsantana Hmm yeah I guess the idea there was that if they weren't close enough to get grouped together into 1 single shared coordinate it should always split.
I think we can just get rid of that if statement of that solves your problem?
from tsclustermapview.
Yes @ashare80, I commented the if statement and it solved my problem
from tsclustermapview.
@pcsantana ok cool next version will remove it
from tsclustermapview.
Thank you! :)
from tsclustermapview.
Related Issues (20)
- Annotations are not visible if removed and added back again HOT 2
- Sometimes a cluster annotation becomes a single annotation HOT 4
- Drag spontaneously cancelled after moving a short distance HOT 2
- Zooming out animation HOT 2
- Group annotations HOT 2
- Vanishing annotations HOT 5
- Cluster Annotations is not visible. HOT 2
- Show number produced by sum of custom data on clusters instead of number of pins in cluster HOT 1
- negative span value results in crash HOT 4
- How to select a clustered annotation programmatically? HOT 5
- Cluster use 200% of cpu HOT 7
- the map show nothing in release build, normal in debug build HOT 9
- The annotation disappear suddenly, sometimes swap to other annotation...happen often
- Added annotations at viewDidLoad, but they appear on map only if I resize it.
- Terminating app due to uncaught exception 'NSRangeException' HOT 1
- Annotation cannot get selected HOT 1
- tvOS support
- Clusterization broken in 3D view
- Example is broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tsclustermapview.