Issue 90: [iOS] Marker View more info issue.
Status:  New
Owner: ----
Reported by fiveflam...@gmail.com, Dec 27, 2011
What steps will reproduce the problem?
1. Opens Augmented Reality overlay view
2. View shows two or more POI MarkersView with image and label.
3. Tap anywhere in the screen shows only on Marker's info view.

What is the expected output? What do you see instead?

It would be better that the Info View only shows when Marker is tapped not when anywhere in the screen is tapped. By this way Info View could be updated for each POI tapped, instead, I only can show one POI's information when there are two or more in the screen.


What version of the product are you using? On what operating system?

I'm using last Mixare version for iOS


Please provide any additional information below.

I think the problem is localized in 

- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event

that doesn't return correct MarkerView, I was trying to solve it but I can't :(

King regards and very good job.

Sergio

http://www.fiveflamesmobile.com

Feb 2, 2012
#1 serhats...@gmail.com
Hello, I have the same problem in ios5.

Any solution??

I need a urgent solution to this issue.

Thanks.
Feb 2, 2012
#2 serhats...@gmail.com
I found a temporary fix for that. You can delete MarkerView touch events and overwrite touch envets for AugmentedViewController. 


- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
    UITouch *touch = [touches anyObject];
    CGPoint currentTouch = [touch locationInView:self.view];
    int index = 0;
    for (PoiItem *item in ar_coordinates) {
        MarkerView *viewToDraw = [ar_coordinateViews objectAtIndex:index];
        CGPoint loc = [self pointInView:ar_overlayView forCoordinate:item];
        
        float width = viewToDraw.bounds.size.width * scaleFactor;
        float height = viewToDraw.bounds.size.height * scaleFactor;
        
        viewToDraw.frame = CGRectMake(loc.x - width / 2.0, loc.y-height / 2.0, width, height);
        CGFloat began_x = loc.x - width / 2.0;
        CGFloat began_y = loc.y-height / 2.0;
        
        CGFloat end_x = began_x + width;
        CGFloat end_y = began_y + height;
        
        if (currentTouch.x >= began_x && currentTouch.x <= end_x && currentTouch.y >= began_y && currentTouch.y <= end_y) {
            NSLog(@"Touched item  catched = %@", viewToDraw.yourAttribute);
            break;
        }
        index ++;
    }
}

Mar 29, 2012
#3 voyage...@gmail.com
Not Work :(

Any solution??

I need a urgent solution to this issue.

Thanks.
May 12, 2012
#4 DevBinn...@gmail.com
I'm not objective-c expert,
but base on my understanding,
there has to be a check point when user click (in function touchEnded)
that calls

-(BOOL)checkIfDataSourceIsEanabled: (NSString *)source;

and (if that does't work) check the coordiante manually with

- (BOOL)isEqualToCoordinate:(PoiItem *)otherCoordinate;

Regards.
Apr 18, 2013
#5 adrigr...@gmail.com
Are there any solution about the problem working?