Draw Lines between pins with iphones Map Kit - iphone

Is it possible to draw custom lines between two or more locations with the MapKit? Or do I need a custom overlay? Is there some kind of tutorial about this topic?
I have a working "Google Maps Application" and now I want to connect my locations with straight lines.
http://maps.google.com/maps/api/staticmap?size=400x400&zoom=13&path=color:0xff0000ff|weight:5|40.737102,-73.990318|40.749825,-73.987963&markers=color%3ablue|label%3aS|40.737102,-73.990318|40.749825,-73.987963&sensor=false

You can draw lines in map using MKPolyline.
See this link
http://spitzkoff.com/craig/?p=136

You Can Draw Lines Between Two pins
See The Link:
mapkit route

Related

Are leaflet polylines capable to look like spheric projection?

I want to swap from commercial googlemaps to openstreetmap and cannot find an answer to the following question:
"Old" googlemaps project show paths as "speric projections" - look here:
http://wsprnet.org/drupal/wsprnet/map
I have created a map using openstreetmap and leaflet and can draw the paths using polyline. It works - but they are always "straight lines" and do not look as at googlemaps (see link above). Is there any possibility to get a path like in ge?
Regards
Andreas
What you want to do is show geodetic lines along great circles. There's a Leaflet plugin for this, at https://github.com/henrythasler/Leaflet.Geodesic .

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.

Draw route openstreet maps

I have several geo points witch I want to use to draw a route using the openstreet maps. Where can I start is there any documentation for this map ?
Thanks
There are several ways to plot routes on OSM. JXMapViewer is good if you're coding in java and should allow you to do whatever you want.
http://wiki.openstreetmap.org/wiki/JXMapViewer2

iPhone - Image overlay MapKit framework?

I can see with iOS4 you can now tile an image on google maps (Been looking at the TileMap example from apple). This is great as this is what I want to do, but from what I can see I need to know the GEO reference of the image so I can raster the images with the appropriate zoom levels, etc. What I have is an artist image, which is a map of a specific area and I want to overlay this image on google maps.
Am I missing something here, but can this be done with a none standard map and having different zoom levels?
The main reason why I need to use google maps is because of the GPS functionality, so the user will know where they currently are on the map.
Georeferencing is how you "pin" your image to the world. It is a tricky process, but not too hard once you dig into it.
You've already found the TileMap example code - that is the first step.
Next, check out MapTiler.org. There you will find links and some binaries that you can use to process your image into georeferenced tiles.
If you don't know the lat/long coordinates for your image, you can use Google Earth to interactively overlay the image onto the map, and then copy the coordinates out.
Good luck!

polyines on iphone

I want to know how to display the route between two Points on
map using mapkit framework in iphone
Is there any Api that can used to display the route between two
Pins. If not Is Polyines is standard to show route between two
pins.Can we display the route on Map with the help of polyines on iphone
or is it dummy route between two points.
Thanks in advance
There's a nice sample on how to accomplish this with a custom MKAnnotationView here: http://spitzkoff.com/craig/?p=108
You can find a working example at http://github.com/leviathan/nvpolyline This solution is especially targeted at iPhone OS versions prior to v.4.0
Although it can also be used in v.4.0 Hope this helps.
You could use Quartz to draw your lines.
Get the context of your map view
Move to the point of your first pin
Add a point to the point of your second pin
Configure your stroke (line-style, width, color)
Draw
A good tutorial about drawing with Quartz:
http://www.cocoadevcentral.com/d/intro_to_quartz_two/
If you do this you will have your app rejected. You are not allowed to use the Google Map tiles (and thus MapKit) for routing.
You can use one of the open map frameworks, they may also support API's for drawing routes atop them. I would explore that before figuring out how to draw your own polylines.