Code Monkey home page Code Monkey logo

revclustermap's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

revclustermap's Issues

Minimum cluster pin size

Hi,
I'm not sure if it is already implemented in the current version.

I would like to prevent pins clustering and show single annotations if the visible pins count is < than a specified integer.

Thanks

using storyBoard

i use story board how can i use this lib step by step Can U help me

MapVC loaded from Nib

Hi

Thanks for sharing this, it seems like quite a nice API.

I just tried it and failed because I think it doesn't support a Viewcontroller loaded from nib is this right?

iphone 6 crash issue

Hello,

i have tried this code with iPhone 6 but it still give me crash.can you have any advice on that?i have a crash on when "REVClusterAnnotationView" when i tap on map, it crash on same time,this is not happen with any other iOS device.

addAnnotation: with a single REVClusterPin deletes all the pins

The original method inherited from MKMapView seems to be messing up your clustering info. I think it's because it's not implemented in your custom REVClusterMapView.

I could solve it by adding the single pin using addAnnotations: with an array of one single object, so no problem. But I think It could be a nice feature to add to your component :)

Problem in iOS 7

I got problem in height of MKMapview in Revcluster map.
file of REVClusterManage.h ---> mapView.visibleMapRect.size.height
I got "0" (Zero) value in this height so no one pin adding into mapview.
please some one have this question answer then tell me solutions for it.

base_radius

Maybe I'm wrong here, but I thought that if you decrease BASE_RADIUS I could see more annotations.
However BASE_RADIUS and MINIMUM_LATITUDE_DELTA are not used anywhere.
Everything else seems great!

User Location

When I turn on the user location

[m_MapView setShowsUserLocation:true];

Then I pinch to zoom in or out, the user location reanimates it's self as if It was just turned on for the first time. Rather annoying.

So, If I modify REVClusterMap so the MKUserLocaiton is not removed from the annotation collection as such...

- (void) mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated
{

if( [self mapViewDidZoom] )
    {
        //[super removeAnnotations:self.annotations];
        //self.showsUserLocation = self.showsUserLocation;


        //Make sure we remove all the annotations first, except the user location
        for (int i =0; i < [self.annotations count]; i++) 
        { 
            if (![[self.annotations objectAtIndex:i] isKindOfClass:[MKUserLocation class]]) 
            {                      
                [self removeAnnotation:[self.annotations objectAtIndex:i]]; 
            } 
        }
    }

//...rest of the code...
}

Then the user location does not reanimate it's self. Great!! However, the clustering has strange artifacts.
Sometimes I see clusters on top of other clusters. And the number of pins and clusters do not always add up. If I undo my changes then the strange artifacts go away.

Is there another way NOT to reanimate the user location each time the zoom is changed?
Or, if you try the code above, did you happen to solve the strange artifacts that show up?

Thanks,
Brian.

Issue with removeAnnotations

I currently have REVClusterMap integrated into my app. When the map first loads, it fetches objects from the network and loads the objects onto the map. Everything is fine until I reload objects (tap refresh). Objects aren't removed from the map until after I scroll (regionDidChange:animated). I call removeAnimations: but doesn't seem to perform anything, until I start scrolling.

[self.mapView removeAnnotations:self.allPosts];
self.allPosts = [NSMutableArray array];

for (PFObject *object in objects) {
    REVClusterPin *newPost = [[JSClusterPin alloc] initWithPFObject:object withIndex:[objects indexOfObject:object]];
    [self.allPosts addObject:newPost];
}
[self.mapView addAnnotations:self.allPosts];
self.mapPinsPlaced = YES;

Any ideas why this is happening? I tried to implement the removeAnnotations: method in REVClusterMap like so...

- (void)removeAnnotations:(NSArray *)annotations
{
    self.annotationsCopy = [NSArray copy];
    [super removeAnnotations:annotations];
}

But no luck

Regarding cluster categorisation...

I am implementing cluster map using REVClusterMap. Its Same as our requirement but some changes required.
Ex. I have 2 category of pin(Land, Building).
If cluster have same category pin with no. of count then for Land green and for building Blue colour of cluster count background.

And if cluster have both type of pin(Land & Building) then its showing combination of half-2 colour circle of cluster background.
So please suggest me a way.. of customisations of categorisation

Get clustered annotations when tapping a cluster pin?

Hi there,

I really owe you a beer for putting up REVClusterMap on Github, saved me a lot of time. Thank you.

I've got two views, one is your REVClusterMapView and the other one is a list of annotations. I want to replace the annotations when tapping a cluster pin with its clustered annotations.

I thought I had to implement this in

-(void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view

which wasn't called until I seted the title attribute of the cluster annotations (MKAnnotation documentation says that you have to set the title attribute to show a callout and therefor call the delegate method).

Ok, the delegate method gets called but now I'm a bit lost how to access the clustered annotations within the cluster pin. I've found the RVSAnnotationCollection, so I think this should be possible, can you give me a hint?

addAnnotations for not just once

REVClusterMap is a great project I found for this too long.

But found some problems in my project.

I'm addAnnotations for many times, and need keep old annotations, but seems i will lost the old annotations.

I'm looked into the code, I think the problem should happen in REVClusterMapView the functions regionDidChangeAnimated and addAnnotations

in addAnnotations

annotationsCopy = [annotations copy];

and after this I move the map, we will call regionDidChangeAnimated

[super removeAnnotations:self.annotations];

NSArray *add = [REVClusterManager clusterAnnotationsForMapView:self forAnnotations:annotationsCopy blocks:self.blocks minClusterLevel:self.minimumClusterLevel];

we remove all, and just add new.

Can we set clusteredBlocks throughout the map and not only on visible map rect?

we have below code
for ( REVClusterBlock *block in clusteredBlocks )
{
if( [block count] > 0 )
{
if( ![REVClusterManager clusterAlreadyExistsForMapView:mapView andBlockCluster:block] )
{
[newPins addObject:[block getClusteredAnnotation]];
}
}
}

return newPins;

in + (NSArray *) clusterAnnotationsForMapView:(MKMapView *)mapView forAnnotations:(NSArray *)pins blocks:(NSUInteger)blocks minClusterLevel:(NSUInteger)minClusterLevel
method.

How can I manage the clusteredBlocks so that they deal with the whole map and not only on visible rect of map.

Cant show my custom callout view

i wanna show custom callout view and center annotation view when user touch annotation pin,but there is some problem.When I called center map region and add my custom callout view in - (void)mapView:(MKMapView *)mapView
didSelectAnnotationView:(MKAnnotationView *)view u will remove all annotation view,
and my custom callout view is also removed.

Please help me thx

select clustered annotations and get title and subtitle

I am able to get title and subtitle of single annotation by selecting single annotation pin. But how can I select clustered annotations and get the title of all pins included in that cluster. For example, If I have a cluster of 5 pins. I want to get the title and subtitle of all the 5 pins.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.