Comments (7)
Hm, I never had issues with vanishing paths, and I use them a lot. Can you create a demo project that shows the issue?
from route-me.
FYI, it actually doesn't seem like a bug because the paths are between points that are far apart (100+ miles) and once you zoom in the associated annotations would be "hidden"... So, the behavior actually makes sense, but I need a way to show paths between two waypoints that are far apart at high zoom levels. So, any thoughts on how to create a static path between two points would be great!
Thanks!
p.s. I can whip up a working demo to try and flesh this functionality out if need be.
from route-me.
A small demo would be great, so that I have something to play with. Since our products are fairly complicated and use most of the route-me functionality, I might know some not-so-obvious solution to this problem.
from route-me.
BTW if you want an annotation to never be hidden, then you could also set the whole world as the bounding box for the annotation:
- (void)setBoundingBoxCoordinatesSouthWest:(CLLocationCoordinate2D)southWest northEast:(CLLocationCoordinate2D)northEast
from route-me.
Sounds good. I'll work on a demo later today and get it up. Also, your bounding box suggestion might be a perfect solution. I'm guessing if I drew a path between two far points and set the bounding box to be each point that would probably solve my disappearing route problem?
from route-me.
Ah, now I see your problem. This is actually badly documented, I have to admit. You have to set the path bounding box for the annotation and the map view will do the rest. In my code, it looks like this (in a RMMapView category):
- (void)addPolyline:(NSArray *)linePoints withLineColor:(UIColor *)lineColor
{
if ([linePoints count] < 2) return;
linePoints = [GeoUtils reduceNumberOfCoordinates:linePoints to:900];
RMAnnotation *polylineAnnotation = [RMAnnotation annotationWithMapView:self coordinate:((CLLocation *)[linePoints firstObject]).coordinate andTitle:nil];
polylineAnnotation.annotationType = @"polyline";
polylineAnnotation.userInfo = [NSDictionary dictionaryWithObjectsAndKeys:linePoints,@"linePoints", lineColor,@"lineColor", nil];
[polylineAnnotation setBoundingBoxFromLocations:linePoints];
[self addAnnotation:polylineAnnotation];
}
linePoints is an array of CLLocations. So, setting the bounding box to the two endpoints should do the trick.
I think I should make this more evident...
from route-me.
Setting the bounding box worked perfectly, thank you! I'm going to try and implement the rest of the various items using annotations and see how that plays out before trying to implement static layers.
Thanks again!
from route-me.
Related Issues (20)
- Trunk doesn't build HOT 2
- Option to render maps front to back.
- RMMapView in UISplitViewController app, causes duplicate tile handling HOT 2
- Duplicate web tiles fetches HOT 6
- Zoom with zoomWithLatitudeLongitudeBoundsSouthWest creating half-size tiles on iPad2 HOT 3
- shape clipping when map view smaller than its superview HOT 2
- Side effect of imageWithData creates CGColorSpaceRef which is not released IOS 6 only HOT 2
- Choppy marker movement when zoomed in far enough. HOT 3
- Dispatch queue names not unique
- Annotations position translation?
- visibleAnnotations Array Of RMMapView is mutated while beeing enumerated HOT 1
- line artifacts sometimes in map snapshots
- Markers wiggle in higher zoom levels HOT 1
- MapBox 1.0.0 changes HOT 2
- Coordinates become 0 no matter what I set them too. (centerCoordinate) using RMTileSource HOT 1
- Cluster annotations based on groups
- cannot link the libMapView.a to my project
- RMShape disappears if it gets re-added to map view until next zoom or pan
- Changing accessory views when tapped HOT 1
- backboardd crash while zooming
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 route-me.