i have used this link to draw route on map. I am using iOS 6 map view. but i think this is using google map api to draw route on map. when i drop 26th pins it gives me error.
I want to know is this a limitations from google map? What is role of way pointes and if i want to drop more than 25+ pins one by one then what should i do ? Can anyone provide me a link in which we can draw routes between more than 25 pins continuously? if not is there any other way ?
Error messege is : A direction request could not be successfully parsed. Error code 400
Plz help
As i remember a limitation for request to google maps api is 250 per day for one application. I also remeber that google can stop responce when you send to many request for some part of time.
Tell what string did you get from google maps api with this 26th point?
Sounds like that software is using the Google Maps API v2, which has a limitation of 25 waypoints. The Google Maps API v3 has a limitation of 10 waypoints (start, end and 8 waypoints) which can be increased to 25 with a Business license.
Also, FYI the Google Maps API v2 is deprecated, and may stop working as early as May 2013.
Related
Bing is comprehensive and it isn't Google. Also I was given to understand that Bing maps integrates OpenStreetMaps data. An answer for OpenStreetMaps would also be acceptable; it's the capability that matters: construct a URL that causes a browser to show a path on a map.
I don't want to embed Bing maps as a control in a web application. I want to construct an HTTP request (GET or POST) to launch Bing maps in its own right in another tab or browser supplying a small series of points (probably GPX format) to be shown as a route on the map.
It's the structure of the URL (and payload if applicable) that interest me. If you want to put code in an answer Javascript, Typescript or server side C# are all no problem.
When I research this I find loads of info on using an API to request a route between two points. This would be fabulous if I were trying to create yet another nav app but the requirement here is simply show this series of points as a path on a map.
I can do it for a single point (sample lifted from another question's answer) https://www.bing.com/maps/?v=2&cp=53.0210235~-1.48398532&lvl=16&dir=0&sty=c&sp=point.53.0210235_-1.48398532_My%20Phone
The Microsoft APIs documented here all require a registration and key because they're intended for Enterprise applications that support embedded maps in branded apps with the enterprise paying for use.
My application is FOSS and is intended for a private individual to plonk half a dozen points on a map in the course of trying to figure out where a phone was lost without consenting to being tracked by Google or a phone manufacturer.
The example above launches Bing maps and passes a point. Is there some kind of URL based way to get Bing maps to launch in its own right - not hosted in another app - and show a series of points for display as a path? If so, what search terms should be used when looking for details? The answer from which I lifted the sample has a link but it no longer produces the docs.
If you want to just open the bing maps website with some information drawn on the map, the documentation for that is here: https://learn.microsoft.com/en-us/bingmaps/articles/create-a-custom-map-url
To draw a polyline on the map, take a look at the section titled "collections" which describes how to add points, lines, or polygons to the map. As a quick example, this URL will create a simply polyline: https://bing.com/maps/default.aspx?sp=Polyline.47.68_-122.12_48.68_-123.12_49.68_-122.12_LINE_some%20notes_http://bing.com__%2300ff00__4px_Single_Solid
I have implemented the Bing Maps AJAX Control v7 in a website that has 4 predefined walking routes that the user can choose. The chosen route will then be displayed on the map via the Directions module (directionsManager.calculateDirections()) and also the textual description will show up in a div container next to the map.
It all works fine, except that sometimes the directions are not returned by the API and I get the following error returned in the error callback:
Object {
responseCode: 17,
message: "Fußwege sind derzeit nicht verfügba…", // This is german for: "walking directions are currently not available"
eventName: "directionsError"
}
The routes are given in a JSON as simple array of waypoints. Because it does work sometimes, I would conclude the problem does have nothing to do with the waypoints itself.
Note that it does not matter whether the directions are fetched for walking or driving (same error code).
So my questions are:
Do I just have to live with it? If so, what would be best practice to handle the situation regarding user experience?
If not, what could be the cause for this?
Any help would be greatly appreciated!
I suspect that your account is being rate limited. This occurs to trial and basic Bing Maps keys when either your account is consuming transactions at a rate that will exceed the free terms of use, or when the service is under a lot of load from others who are using Bing Maps under the free terms of use. The only way to limit the possibility of being rate limited is to upgrade to an Enterprise key. If you are using an enterprise key and are seeing this issue, then contact the Bing Maps Enterprise support team and they will investigate.
Based on this article Bing Map Usage, there are 2 ways to load the Bing Map:
AJAXTileUsage, create a map session with bing map key and download the map tile: 8 map tile download is counted as one non-billable transaction
LoadStandardMap, a map tile URL is used to download a map tile using a Bing Maps Key. 8 map tile download is counted as a billable transaction.
There is cost implication here. So obviously we should try to use the AJAXTileUsage.
However based on current reading and internet search, I am a little confused about what we are using right now. Basically we are just using Bing Map Ajax Control 7.0 Map class (see link). Our code doesn't really need to handle the map tile download ourselves.
Based on the http traffic capture from fiddler, here are the steps:
client sends web services request to https://dev.virtualearth.net/webservices/v1/LoggingService/LoggingService.svc/Log with a bing map key
a session id is created and returned to client
map tiles are download, the download URL is like this: https://t0.ssl.ak.dynamic.tiles.virtualearth.net/comp/ch/0320?mkt=en-us&it=G,L&shading=hill&og=30&n=z&key=xxxxxxxxxJeOuGjaxxxxxxxxxxxxxxxxxxFc-Jxxxxxxxxxxxxxy_xxxxxx, (I replace some characters with xxx there). Interesting part is that this key is neither my bing map key nor my session id. I guess that it might contain the session id information within it although I am not sure how to decipher it.
If I move around on the map, more tiles will be downloaded with similar above URL (with some difference at the number after comp/ch. It should be map tile quadkey there)
So does this mean that we are using AJAXTileUsage instead of LoadStandardMap? If so, it would be great since our tile usage won't be counted as billable. I tested with Bing Map trial key, however it seems that Bing Map Usage Report at Bing Map portal is not recording my usage even after couple days are already passed, so I could not figure out from there.
It would be really appreciated if someone could shed some lights here.
Update:
by the way, for above map download URL, I could download map tile without any key: such as https://t2.ssl.ak.dynamic.tiles.virtualearth.net/comp/ch/xxxx?mkt=en-us&it=G,L&shading=hill&og=30&n=z (I changed the quadkey there)
Update 2:
From post: http://www.bing.com/blogs/site_blogs/b/maps/archive/2012/02/01/bing-maps-reporting-tips.aspx:
Many of the Bing Maps API’s have a method for getting the credentials from the map after you
have loaded it using a valid Bing Maps key. One often overlooked feature is that, by getting the
credentials from the map, you do not get back your original Bing Maps key. Instead, you get a
special session key which you can use as a Bing Maps key to make requests to the Bing Maps
services. By doing this, all transactions occurred by this session key will be non-billable.
Many developers overlook this feature and opt to simply use their original Bing Maps key, not
knowing that they are actually incurring more billable transactions than they need to
So based on above information, the mystery key for downloading map tile should be the session key.
If you are using one of the Bing Maps V7 JavaScript controls all tiles are counted under the AJAXTileUsage category. The only time tile usage is billed is if they are accessed directly or perhaps if you are using one of the old map controls
The reports in the Bing Maps portal take a several days to a week to sync due to the number of servers/data centers/users/and transactions generated.
I want to draw a route between two places. I have the GPS value of those places. I can get the GPS route values between those places from the google api http://maps.google.com/maps?output=dragdir&saddr=&daddr=.
I want to know that will google reject my app. Because I found that "the Directions API may only be used in conjunction with displaying results on a Google map; using Directions data without displaying a map for which directions data was requested is prohibited. Additionally, calculation of directions generates copyrights and warnings which must be displayed to the user in some fashion. For complete details on allowed usage, consult the Maps API Terms of Service License Restrictions"
Ple give me clarification on this.
You may not use the Google Maps API unless you use it with a Google Map. To use the direction data you would have to use a UIWebView with a javascript based Google Map.
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/