Offline map from sdk - iphone

In my application i have a MkMapview and now it shows current location. i have to bookmark some other locations and show that locations even if there is no Wi-Fi connection. How to bookmark that locations and how to display the offline maps? how to save map to cache? is it possible?
Thanks,

As far as I know, there is no public available API for caching the map images used by MKMapView. You might also be in violation of Googles terms and conditions by doing this.
However, Google have provided a static map API where you can grab a static portion of a map as an image file and possible cache this for later display. But again, check Google's T&C.
There are a number of other map services available through the GData API, but they are somewhat more complex to use. This SO question, shows a few hints on how to use these API's.

Related

Show traffic like in Maps app from iphone using MKMapView

I've noticed that the maps app integrated in iOS can show the traffic, but is there a way to do that using MKMapView? or that functionality only appears in that app?.
Any help please?
The data Apple uses appears to be sourced from TomTom and others. If you can find an API that provides traffic data, you can use a MKPolyline to render the data.
As far as I know you can't show the traffic information using the MK framework.
To achieve the results you want I would offer to use the third party resources, Google Maps API for example, and use UIWebView to present a customized map. Google Maps JavaScript API v3 TrafficLayer

iOS Mapkit - Cache maps?

I need maps of certain areas available when no internet connection is available.
It would be like this:
User loads app internet connection is available
App downloads list of coordinates and places pins on the map
User leaves their house and has no internet connection
Pins and map remain readily available for user to interact with, even without internet connection
How do I do this?
You probably won't use MKMapView and MapKit for that, but the Google Maps Static API that allows you to download static images (even with pins on it) directly.
Here is the example given by the Google Maps API doc itself
Then you can store this image and display it in an UIImageView in a UIScrollView for example.
Possibly the above mentioned Google API achieves just this, but another approach is to create a KML file using Google custom maps or some other service and then download and display it. An example can be found here. Alternatively, MapBox has this functionality built in. Go to this webpage, click command-f and search for "offline", and you will find the relevant information. One last suggestion- as an inelegant hack, if no other option works, you could try saving the html of the google maps webpage for the area and then loading that html file from your main bundle into your map view. I have no idea if that would work, but in a last case scenario it would be worth a shot.

how to create customer map on iPhone without using Google Map

I'm trying to integrated in our iOS app. Due to the bad relationship between Google & our government, Google Map is not a good idea.
We have bought a local map service company's javascript & Web Services based SDK, now we want to use it on iOS. But it seems that MapKit does not support customer tiles.
So here are my current ideas:
Use UIWebView. But I tried that map in Safari, I can't drag to move the map nor use two fingers to zoom. I think I need to call some javascripts while touch events happens.
Build a costumer UIScrollView, download map images and display them using iOS sdk. But that map service does not have API to download images, I tried to read their 200KB+ undocumented javascript to find out the relationship between location & image files, but I got no results for now.
Both the two ways could face certain legal risks. I'm not sure what the purchase contract is like.
I need suggestions about the two ways or some new ideas. Thanks guys.
There are a couple of non-Google map implementations available on github that you might be able to use (linked via CocoaControls):
NAMapKit
MRMapView

How to implement google maps in my iPhone application

I am totally confused with google maps and maps of iPhone...
i have read that iPhone uses google maps.....and also spent some time on it....
But it never display the items like location pictures, balloons etc.
EDIT
THIS is photo for of browser
and following is same place for iPhone maps
second one did not show the annotation added by people.....
(this is what i was asking for ballons or other pictures which people adds to location on oogle maps)
I want to display all those in my application....
what should i do...
if you suggests implement Google maps API, then please suggest a working link...or provide some sample code if possible.....if anybody has done it...then please mail me at yogeshkumau#gmail.com
waiting for answer......
Points of Interests(location, pictures and baloons) that you are talking about can be shown in your maps, if you acquire the license for Google maps premier api. In that case you'd have to use dynamic maps by using google's web services. However if you want to implement it using MapKit framework on iOS devices, you'd have to draw your custom POIs using core graphics.
Apple has a special agreement with Google to use their maps on their platform. The internet is packed with examples of usage of MKMapView along with annotations (pins, there're no baloons on iPhone).

Route Map in iPhone

Does iPhone sdk supports route between two places on Map? I have searched many times. But not able to find any reference. Even on apple iphone development forums, there is no such thing available.
I have done this functionality using google map url. In which I have to pass source and destination latitude & longitude. I am getting the map but it is not as much good as like the iphone google map.
Can anyone help me out to do this functionality? I need to display map route between two places and also want description of the exact path to reach the destination.
No, the API has no means to do routing. You can do overlays if you can figure out the route, but that's obviously a lot more work.