Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

RMPath: path out of visible area ramain invisible when moving programly. #50

Open
michaeltyson opened this Issue · 0 comments

1 participant

Michael Tyson
Michael Tyson

What steps will reproduce the problem?
1.Use SampleMapwith following code in viewDidLoad:

[CODE]
// Set map view center coordinate
CLLocationCoordinate2D center;
center.latitude = 47.582;
center.longitude = -122.333;
slideLocation = center;
[mapView.contents moveToLatLong:center];
[mapView.contents setZoom:17.0f];

// Add 2 markers(start/end)  and RMPath with 2 points
RMMarker *newMarker;
UIImage *startImage = [UIImage imageNamed:@"marker-blue.png"];
UIImage *finishImage = [UIImage imageNamed:@"marker-red.png"];
UIColor* routeColor = [[UIColor alloc] initWithRed:(27.0 /255) green:(88.0 /255) blue:(156.0 /255) alpha:0.75];
RMPath* routePath = [[RMPath alloc] initWithContents:mapView.contents];
[routePath setLineColor:routeColor];
[routePath setFillColor:routeColor];
[routePath setLineWidth:10.0f];
[routePath setDrawingMode:kCGPathStroke];
CLLocationCoordinate2D newLocation;
newLocation.latitude = 47.580;
newLocation.longitude = -122.333;   
[routePath addLineToLatLong:newLocation];
newLocation.latitude = 47.599;
newLocation.longitude = -122.333;   
[routePath addLineToLatLong:newLocation];
[[mapView.contents overlay] addSublayer:routePath];

newLocation.latitude = 47.580;
newLocation.longitude = -122.333;   
newMarker = [[RMMarker alloc] initWithUIImage:startImage anchorPoint:CGPointMake(0.5, 1.0)];
[mapView.contents.markerManager addMarker:newMarker AtLatLong:newLocation];
[newMarker release];
newMarker = nil;

newLocation.latitude = 47.599;
newLocation.longitude = -122.333;   
newMarker = [[RMMarker alloc] initWithUIImage:finishImage anchorPoint:CGPointMake(0.5, 1.0)];
[mapView.contents.markerManager addMarker:newMarker AtLatLong:newLocation];
[newMarker release];
newMarker = nil;

// Start moving map (after few moves path become invisible until user touch screen)
[NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(slide) userInfo:nil repeats:YES];

}

-(void)slide{
slideLocation.latitude = slideLocation.latitude + 0.0002;
[mapView moveToLatLong:slideLocation];
}
[/CODE]

  1. Run project.
  2. see how path becomes invisible.
  3. Touch/drag map. path becomes visible.
  4. Map continue to move and

What is the expected output?
Path visible all the way map moves on it.

What do you see instead?
Visible only initial part of route.

What subversion release are you using? Does the behavior occur on the
simulator, a real iPhone/iPod Touch, or both?
Both.

If you can reproduce your bug, please provide the source code for a
reproducing case. The best place to start is with the SampleMap project.

Please don't send patches/diffs. Post source code directly to the issue
tracker, noting your suggested revisions. If they are extensive, use a
branch in subversion with the same name as your issue number (e.g.
branches/issue59).

Please provide any additional information below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.