Looking to draw line between two dynamically selected points in mapkit - ios5

I am working on an app that would draw a "route" between two points on a lake that will be dynamically selected from annotations on the map. I've looked to see if anyone has tried to do this, and I haven't found an answer to this question. If you can help that would be great.

Related

Mapbox / Leaflet / MarkerCluster - How to show multiple paths on the same coordinates

On the map I'm working on, sometimes multiple markers will share the same coordinates. I'm using markercluster which is helpful to view markers that share the same coordinates. The problem is, that the paths(lines) that connect them fall on top of each other. I need to show both lines. Is it possible to have each line side by side or similar? Has anyone ran into this issue before? See the below image which shows what I am trying to accomplish.
Try Leaflet Polyline Offset plugin. Here is demo.

Route following simulation in iOS

I am working on moving a map annotation along a route that has been mapped out in iOS, but I wanted it to follow the path given for the directions. So to be clear, I want a simulation of the user following the route of the map without actually doing the route. I have tried doing research and yes, I have seen the breadcrumb tutorial but I am really unsure how to go about following a route as described. Is there some way to get the map with the route broken down into points/data?
Any help or links are appreciated.
Change and animate the coordinates of the annotation along an array of coordinates.
But this requires that you have the "route" as sequence of coordinates. The apple route you will not get as coordinates.
You could use OpenStreetMap to get a vector based route (coordinates).

Weird issue in bing maps display

I am displaying bing maps in a metro app. I am drawing both pushpins and polylines on the map but they get drawn on opposite sides of the map which looks very weird. Please look at the following image:
The line and image is being drawn at opposite sides of the map.
Could someone please suggest a solution of this problem.
Can I somehow restrict my view to display each country only once?
So I think one of my other answer might help you out here.
How to show the full map and prevent scrolling in Bing Maps API
You can constrain the map to a certain zoomlevel range and lat/long range, so that you don't see the same coordinates twice. Let me know if you need any further details on how to do this.

Update mapview annotations every second with new coordinates Iphone

I know there are a few questions about this but i just cant seem to find any good answer to the question. What I am doing is fetching information from a db and collect the info into annotations on a map in mapview (Iphone).
What I want is to update the information from the database every second or so and update the annotations so that the new locations is shown on the map. So for instance if coordinates are moving it will show the movement every second. Are there any standard methods for this or any other good fixes?
You can use [yourAnnotation setCoordinate:newCoordinate];
Pls see if this SO question helps you MKMapView moving Annotations Automatically - animate them?

Using custom map with MKMapKit

I am creating an iPhone app for OS4.0, and I am attempting to integrate a custom map with a standard MKMapView. I have been provided a map in .eps format (vector image), and I want to somehow overlay this on an MKMapView in and restrict the scrolling boundaries of the map so users cannot scroll outside the boundaries of the custom map. What's the best way to go about this?
I have read some stuff about hosting map tiles on a server, but this seems overly complex for my application. This would just be a map for an attraction roughly the size of a public zoo, so I would think that it would be conceivable to just convert the .eps to a .png file, and overlay it, but this might not give the best performance.
I understand that I could conceivable use a UIScrollView to do the job, but the problem is that I have dynamically generated MKPinAnnotationViews placed on the map, whose position must be based on latitude and longitude, so I can't think on an elegant or reasonable way to do it with a scrollview. Any ideas?
Thanks!
-Matt
Apple has a great bit of example code that will show you what you need to do. Check out the TileMap sample - it is available as part of the (free) WWDC 2010 samples download.
It shows you how to use the gdal2tiles utility to convert an input map into a tree of overlay tiles.
Another good bit of Apple sample code to check out is HazardMap, which is part of the regular SDK samples.