iPhone core location, maps navigation - iphone

I've searched quite a lot and didn't find the answer, is it possible to have a map view which will navigate to specific locations?
Like integrated iPhone map application...
I want to have 3-4 addresses and when you click on one it will show directions on map how to get there, can it be done?

No, I dont...I can google just like you :)
It looks pretty simple though - you just need to build your direction requests:
http://maps.googleapis.com/maps/api/directions/output?parameters
for example:
http://maps.googleapis.com/maps/api/directions/json?origin=Boston,MA&destination=Concord,MA&waypoints=Charlestown,MA|Lexington,MA&sensor=false
and you get back a response in this structure, and you just need to parse the JSON object:
http://maps.googleapis.com/maps/api/directions/json?origin=Chicago,IL&destination=Los+Angeles,CA&waypoints=Joplin,MO|Oklahoma+City,OK&sensor=false
Hope that helps.

Related

Can I create multiple different routes in the same area/map in Google Earth Pro?

I am attempting to create more than one possible route for a sailboat charter in the British Virgin Islands this year. I am trying to use Google Earth Pro to map out those routes. It worked great to map out one route option. I cannot find a way to save that route and create a different route within the same group of islands. It appears to me (in my ignorance) that once one creates a route in any spot on the planet, that is the only route one can have in that spot unless one totally deletes the existing route and starts over? Is that true?
Is there a way to create multiple "what-if" routes and save them separately as routes and not as just an images or screen captures?
If not in Google Earth Pro, should I be looking into some other product?
I created one "what-if" route. I can save it off as an image. I looked into "layers" hoping I could create, show, and hide my own layers. It looks to me like they only have pre-canned layers? I tried creating a second "My Place" but I can't find a way to show one "My Place" and hide another when they are both in the same location. Is that possible.
Note: If this is not the sort of question one would ask in stackoverflow, sorry. I was surprised when I searched internet looking for a solution that it brought up similar questions here. I hope it's ok to post this here and that someone can shed some light. THANKS!!

Is it possible to pass data needed for driving directions to the Bing Maps website?

I have an application that currently links to Google Maps passing it the required URL parameters needed to show driving directions for a set of points (typically 3+). This approach has worked and has allowed us to not use their API, which worked fine.
With Google, they made it pretty easy and clear by using parameters like "saddr" for the starting address, "to" for way points, and "daddr" for the destination. I could even pass in "pw" if I wanted to put the map into print mode. Simple, easy, works great!
I'm trying to determine if Bing Maps supports the same thing. I have been unable thus far to find any examples showing how this can be done, nor have I been able to easily decode the URL after creating my own driving directions using Bing Maps.
Again, I'd like to avoid using the API and am find with sending users to Bing's site when clicking my link.
It this possible? If yes, how can it be done?
Yes it is possible.
And I just wrote a little blog post to demonstrate how: http://alastaira.wordpress.com/2012/06/19/url-parameters-for-the-bing-maps-website/
Alastair's answer has full details if you follow the link through to the blog post.
But if you want the quick answer (again, thanks Alastair) use this root:
http://www.bing.com/maps/default.aspx?where1=
and stick your search destination in at the end. Eg. this gets you to Atwood Rd in London using its postcode:
http://www.bing.com/maps/default.aspx?where1=W6%200HX

Custom Maps in iPad App

I just want to build a drill down map like this - Drill Down Map
Here I want to show some data on tapping of each regions.I am out of clue. How can I ? What should I use ? From where to start ?
EDIT : In the link it's showing the country name on mouse over, instead of that I want to show some data/info of the country on touch. Please visit the map shown in the link,you'll get the whole idea.
Thanks !!
If you want total control on the map layout, and be able to check which country the users taps, there's no secret : you need to have boundaries of all countries you want to detect.
Here's the global approach I would use to reimplement something that looks like the map you linked to (I can you into more details if you want, but at first, here's the global approach) :
Get the data of the boundaries of the countries you need. This can be done using OpenStreetMap.org data.
[EDIT] I just came accross this website to download countries boundaries as files you can then use with tilemill : http://www.gadm.org/country
Use this data with tilemill (http://mapbox.com/tilemill/) : this tool is able to design maps using a language that looks like CSS but dedicated for maps. The results is great and the tool great as well. This tool also support shapes files, so if you can get the countries boundaries as shapefiles, you'll be able to use them with tilemill, and this will be easier than using .osm files from open street map). Have a look here http://mapbox.com/tilemill/data/ for the supported formats.
Then, with tilemill, export your map as an MBTile file (this file contains all tiles needed to get the map rendered at different zoom levels).
Use the route-me project to display the resulting MBTile file (in its latest version, route-me is able to do that, this feature has been implemented by the mapbox team to support their open format MBTile).
Guys from Mapbox have published a good tutorial "from data to maps" here : http://mapbox.com/demo/making_massredistrict/ this may help as well
Your best bet is to use CloudMade ( http://cloudmade.com/ ). They provide custom map builders program where you can build custom maps and can integrate those maps in your iOS app.
Depends what you are looking for. To implement the linked example it's enough with a giant image that you can split in tiles using CATiledLayer. You'll find examples if you google a little, PhotoScroller is one. If you want to display real maps you have to investigate the route me project.
I don't think that using images could be good option.Check this link - arcgis-iphone api. I am not so sure but you can get some idea from this.
Happy to help..

Current Location to destination using mapview or google maps for the iphone iOS Xcode 4

SO I am a totally new and do not know where to begin. I basically want to create a view that shows the users current location and directs them to my set location (park, concert, business, etc.). It seems fairly simple but there is so much smoke and mirrors online that I do not know where to start or how to finish. Would it be easier to call to google maps or use the mapview in the SDK?
And the bigger question is how do you do this? I mean I can create simple views and load webviews but I can not figure this out.
Use MKMapView .. its fairly straightforward to set up -- you can get the current location from CLLocationManager and pass its coordinates to the map view.
http://mithin.in/2009/06/22/using-iphone-sdk-mapkit-framework-a-tutorial
Have a look at this website http://www.martip.net/blog/localized-current-location-string-for-iphone-apps
it will help you with the current location thing.
Directions are part of the Maps application and are not available in the MapKit API. To give your users Google Maps directions, you need to use the Maps URL scheme, as documented in the Apple URL Scheme Reference. Specifically, you need to include the saddr and daddr parameters in the URL, which specify the start and destination addresses for a directions search, respectively. I believe you can pass latitude/longitude coordinate pairs (comma-separated) for those parameters, but you’ll have to experiment a bit to find the correct formatting and order.
By "direct" do you mean actually show a path for how to get there? That there is no API for. You can place a pin anywhere on a map to show people where something is, but they have to figure out how to get there themselves.
The term you are looking for to add points to a map is adding Annotations to an MKMapView.
Have a look at this website it may help you http://www.raywenderlich.com/2847/introduction-to-mapkit-on-ios-tutorial

Is there any easy way to duplicate the search functionality of the Google Maps app on iPhone?

I'd like to be able to search and have the results pop up as annotations just like the Maps app on the iPhone. How do I go about doing it, and how difficult is it?
You need a forward geocoder to take a string (from your search bar) and find a list of possible matches, with coordinates and such. ... there isn't one included with the MapKit (only a reverse geocoder -- from coordinates to address string). However, there's a few services out that that do this. I think GeoSimple, CloudMaps, and a few others. The one linked below is an objective-c package that pulls results from Google Maps SDK.
http://blog.sallarp.com/ipad-iphone-forward-geocoding-api-google/