sanyaade-augmented-reality / mixare

Automatically exported from code.google.com/p/mixare
0 stars 0 forks source link

[iOS] Marker View more info issue. #90

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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

Original issue reported on code.google.com by fiveflam...@gmail.com on 28 Dec 2011 at 7:16

GoogleCodeExporter commented 9 years ago
Hello, I have the same problem in ios5.

Any solution??

I need a urgent solution to this issue.

Thanks.

Original comment by serhats...@gmail.com on 2 Feb 2012 at 1:17

GoogleCodeExporter commented 9 years ago
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 ++;
    }
}

Original comment by serhats...@gmail.com on 2 Feb 2012 at 8:04

GoogleCodeExporter commented 9 years ago
Not Work :(

Any solution??

I need a urgent solution to this issue.

Thanks.

Original comment by voyage...@gmail.com on 29 Mar 2012 at 2:20

GoogleCodeExporter commented 9 years ago
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.

Original comment by DevBinn...@gmail.com on 12 May 2012 at 7:28

GoogleCodeExporter commented 9 years ago
Are there any solution about the problem working?

Original comment by adrigr...@gmail.com on 18 Apr 2013 at 12:19