How to plot route on a map? - iphone

Is there a way to plot route on a mapview? I can do it through opening a webview, but is there a way to plot it inside the application?

Please go through below links which includes Github project:
https://github.com/kishikawakatsumi/MapKit-Route-Directions
https://github.com/route-me/route-me/tree/master/samples
This is just the demo applications you need to edit as per your requirements.

If oyou are thinking of drawing a route between two locations obtained from Google API then unfortunately, Google license won't let you do what:
10.9 use the Service or Content with any products, systems, or applications for or in connection with:
(a) real time navigation or route guidance, including but not limited
to turn-by-turn route guidance that is synchronized to the position of
a user's sensor-enabled device;
(b) any systems or functions for automatic or autonomous control of
vehicle behavior; or
(c) dispatch, fleet management, business asset tracking, or similar
enterprise applications (the Google Maps API can be used to track
assets (such as cars, buses or other vehicles) as long as the tracking
application is made available to the public without charge. For
example, you may offer a free, public Maps API Implementation that
displays real-time public transit or other transportation status
information.
Here is a similar question:
Drawing a route in MapKit in iPhone SDK

Related

Using Google Map APIs

I am currently working on a personal project to develop a REST API which would perform tasks similar to what UBER, OLA like taxi aggregators do. Below is the brief about the functionality that I plan to add:
1)I have a fleet of cabs whose location is determined by its latitude and longitude.
2)A customer can call one of the cabs by providing their location and my API should assign the nearest cab available.
This I suppose would be accomplished by using Google Map APIs. My question is how do i start on using these APIs, to simulate such functionality?
You may use the following references:
Choose from the Google Maps APIs documentations depending on your needs. There are actually tutorials given within the documentations.
Answers to Frequently Asked Questions will also help especially the getting started part to fully understand how Google Maps APIs work.
Last but definitely not the least, this example in GitHub might help you exactly on the implementation.

Routing in osm?

As a part of my Software Development course I have to build a campus mapping mobile application which would include all the basic functionalities provided in google maps including searching,routing etc. Now in release 2 I have to implement routing.
Note: This is a completely offline application.
I have generated tiles rendered them in my application, implemented search location and present location.
Can somebody tell me how to perform routing in the map as i am in my second year and I have completely no knowledge of OSM?
Note: Also the application is to be cross platform..:)
The OSM wiki contains a lot of information about routing. You should read about OSM's basic elements and OSM tags for routing. If you get stuck at some point then take a look at one of the many online routers, offline routers and libraries, several of them are open source.

IPhone - Is it possible to add a Custom Image as the data source for a Map View?

I want to have a map view that loads from an image that I provide rather than using Google maps. This is basically because the internet will not be available where this app will be used.
I have heard that this is possible since map view is a CATiledLayer, so I should be able to provide custom content, but I am struggling to find information on the topic.
Could someone point me in the right direction?
You can't and doing this would be a violation of Google Map API terms. So Apple cannot even provide you such a feature. You must revert to third-party (and often non-free) services that use other maps.
The terms are here:
Google Maps API terms
This is a relevant (for this answer) extract from the terms:
License Restrictions. Except as expressly permitted under the Terms, or unless you have received prior written authorization from Google (or, as applicable, from the provider of particular Content), Google's licenses above are subject to your adherence to all of the restrictions below. Except as explicitly permitted in Section 7, you must not (nor may you permit anyone else to):
10.1 access or use the Service or any Content through any technology or means other than those provided in the Service, or through other explicitly authorized means Google may designate;
10.2 copy, translate, modify, create a derivative work of, or publicly display any Content or any part thereof (for example, the following are prohibited: (a) creating server-side modification of map tiles; and (b) stitching multiple static map images together to display a map that is larger than permitted in the Maps API Documentation);
10.3 pre-fetch, cache, or store any Content, except that you may store limited amounts of Content for the purpose of improving the performance of your Maps API Implementation if you do so temporarily, securely, and in a manner that does not permit use of the Content outside of the Service;
10.4 charge users or any other third party any incremental fee solely for the use of the Maps API Implementation, the Service, or the Content, unless you have entered into a separate written agreement with Google or obtained Google's written permission to do so (but if you are a consultant who creates or hosts Maps API Implementations for third party customers, you may charge such customers a fee for your consulting or hosting services);
10.5 reverse engineer, decompile or otherwise attempt to extract the source code of the Service or any part thereof, unless this is expressly permitted or required by applicable law;
10.6 use the Service in a manner that gives you or any other person access to mass downloads or bulk feeds of any Content, including but not limited to numerical latitude or longitude coordinates, imagery, and visible map data;
10.7 delete, obscure, or in any manner alter any warning, notice (including but not limited to any copyright or other proprietary rights notice), or link that appears in the Service or the Content;
10.8 use the Static Maps API other than in an implementation in a web browser;
10.9 use the Service or Content with any products, systems, or applications for or in connection with:
(a) real time navigation or route guidance, including but not limited to turn-by-turn route guidance that is synchronized to the position of a user's sensor-enabled device;
(b) any systems or functions for automatic or autonomous control of vehicle behavior; or
(c) dispatch, fleet management, business asset tracking, or similar enterprise applications (the Google Maps API can be used to track assets (such as cars, buses or other vehicles) as long as the tracking application is made available to the public without charge. For example, you may offer a free, public Maps API Implementation that displays real-time public transit or other transportation status information.
After some digging I found that this was not possible using a Map View
I ended up re-implementing a map view from a UIScroll View using a tiled layer as the content view. There is a tutorial how to do this in the 2010 WWDC videos on scroll views.
I then used open maps tiles.
This wasn't easy by any means. It took about a week to implement.

Displaying nearby businesses in mapkit

Is it possible to display nearby businesses in mapkit? If not, how else can that be done?
Is there a way to display by category - restaurant, retail, museums?
Also, I don't think displaying traffic flow is available. Can anyone confirm?
The current version of MapKit does not support such features.
It's main capabilities currently are:
a scrollable/zoomable map
reverse geocoding (get the address for some given lat/long coordinates)
add annotations (pins) at a given lat/long
show phone's current location
show Standard, Satellite, or Hybrid view
To display nearby businesses, you would have to:
query a third-party for that information which would ideally return lat/long coordinates
add annotations to the map using the returned coordinates
This is an interesting and emerging business idea!
I live in Nordic region and there is an open Mashups especially for sweden.
By open i mean, any one can request and get access to the content to find nearby Cafe / WiFi / Sushi restaurants etc..
BEGIN PLUG WARNING
Check my iphone application which fetches content from the mashups and display using MapKit!
END PLUG WARNING
And there is a commercial content provider called Info24 for nordic countries at the moment.
Like DyingCactus said, it's not currently possible without using your own calls to one of the mapping service providers. There are options available, though.
One of them is CloudMade. They have a good iPhone library and support almost all of your requirements.
Check out the API at Cloudmade.com
I know this thread is kind of old, but i figured out a free alternative to do what you are looking for, more or less. You just nee to tap into a maps.google.com service and get a kml or JSON output. I used KML (XML) becuase i found the filesize to be consistently smaller. I wrote a 3 part series on my blog about how to do this for anyone that is interested.
http://www.zen-sign.com/finding-business-listings-and-displaying-with-mapkit-part-1/
http://www.zen-sign.com/finding-business-listings-and-displaying-with-mapkit-part-2/
http://www.zen-sign.com/finding-business-listings-and-displaying-with-mapkit-part-3/

Is it a violation of terms and services to embedd google's turn by turn directions into an iphone app?

I'm trying to embed Google's directions into an iphone app There doesn't seem to be a straightforward way to pull turn by turn data (specifically JSON data) other than adding a UIWebView.
I was wondering if it's a terms of service violation problem or is it something that just hasn't been implemented yet for the iphone.
I've seen Google's directions data imported and styled in flash but I haven't seen anything relating to maps other than linking out to the Google maps iphone app.
From the Google Maps Terms of Use
2: Restrictions on Use. Unless you have received prior written
authorization from Google (or, as
applicable, from the provider of
particular Content), you must not:
(a)
access or use the Products or any
Content through any technology or
means other than those provided in the
Products, or through other explicitly
authorized means Google may designate
(such as through the Google
Maps/Google Earth APIs);
(b) copy,
translate, modify, or make derivative
works of the Content or any part
thereof;
(c) redistribute, sublicense,
rent, publish, sell, assign, lease,
market, transfer, or otherwise make
the Products or Content available to
third parties;
(d) reverse engineer,
decompile or otherwise attempt to
extract the source code of the Service
or any part thereof, unless this is
expressly permitted or required by
applicable law;
(e) use the Products
in a manner that gives you or any
other person access to mass downloads
or bulk feeds of any Content,
including but not limited to numerical
latitude or longitude coordinates,
imagery, and visible map data;
(f)
delete, obscure, or in any manner
alter any warning, notice (including
but not limited to any copyright or
other proprietary rights notice), or
link that appears in the Products or
the Content; or
(g) use the Service or Content with any products, systems, or applications
for or in connection with (i) real
time navigation or route guidance,
including but not limited to
turn-by-turn route guidance that is
synchronized to the position of a
user's sensor-enabled device; or (ii)
any systems or functions for automatic
or autonomous control of vehicle
behavior.
I don't know the specifics of your app, but I'm thinking it's easy to run into issues with clause 2.g.