I need to get the google maps link by pressing a button from the iPhone.
I already know how to get the coordinate long/lang. Now I need to convert it to a link.
I am working with CLLocation & MKMapview
Can anyone help me with that?
Read the "Apple URL Schemes" documentation. Everything about map links is detailed in this page.
http://maps.google.com/maps?f=q&q=38.323480,26.767732
You can change those variables at the end and the link will open the google maps app no need for complicated programming
Related
I would like to know if it is possible to pass an address from an SQlite data base to GPS or Google maps and have it show on a map at the press of a button. If anyone is aware of a tuturial that could help me that would be appriciated.
I would also like to get current location and show local places on map, also populated from the same database. Thanks in advance.
In order to translate address to lat/long coordinate you will have to use the Google directions API since apple is not supporting forward geocoding.
You can take a look at this API - pretty straight forward:
http://code.google.com/apis/maps/documentation/directions/
for iOS 4.x and below you will need to use the Google API but in iOS 5 Apple has implemented a really nice foreword geocoding API.
In order to get directions, Google provides this nice URL:
Sample here...
How can I use the information that Google provides to get the same direction line on a MKMapView in an app?
You will have to either use a web view with a Google map, or draw on the MKMapView with overlays. There are a couple of projects on GitHub that do this:
https://github.com/kadirpekel/MapWithRoutes
https://github.com/kishikawakatsumi/MapKit-Route-Directions
In iOS 5, you can also open the maps app using an openURL call to the link you specified, and it will give you multiple possible routes to the location.
Unfortunately, the way to do it with the built-in MKMapKit is to calculate the route using some webservice then using MKOverlays to render that line. Those tools suggested by neven are probably a good first start.
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.
I am going to develop an app based on google map. In that locations will be displayed with markers or points near current location (point of interest). I have lattitude, longitude of different places and I am also able to find the distance from current location. I just want some help working on google map. Displaying places by latitude, longitude using markers.
I have the MAP View app of google map api. Please suggest me some tutorials or URL/source code which uses marked places and all that.
you should check these tutorials 1, 2, 3
If you're talking about the Google Maps Ajax APIs (for display in a web app), then the Google documentation has copious code examples and explanatory documentation.
If you mean the Google-based maps that are available to native iPhone applications, then please refer to the documentation for MapKit.
This may be helpful iphone-google-maps-component
I would like to create an iPhone app that can open the google maps app and place a pin on the map.
I have the exact location of the pin, specified by its longitude and latitude.
I also have a name for the pin e.g. 'location 1' that should be displayed along with the pin.
I know that UIApplication:openURL can be used for this but I don't know the exact url format.
So, is there a way to do what I described above? If, yes, what is the correct url format?
You can use a URL of the format: http://maps.google.com/maps?q=Your+Location+name#latitude,longitude
http://maps.google.com/maps?q=This+is+near+Lake+Shore+Drive#41.9288,-87.6315
You can drop up to 100 pins using KML. There is an example of this on http://appsamuck.com look at the example for day 8 (http://appsamuck.com/day8.html)
Why should your user have to exit your app to see a map. You can embed a Google map in your application easily. You can even drop multiple pins for which you have lat & long information.
In fact, in my opinion your user should never have to leave your application to view a google map.
An example of how to do this is included as an example application at https://sourceforge.net/projects/quickconnect/.
Download the QuickConnectiPhone zip file and you will find it in the Examples directory.