Transit direction for inter city is not working on heremap rest api - maps

I have been using Public transit v8 rest api ,the transit response works fine for same county in USA, but gives error on planning transit for inter county
Details
URL: Sample here

We have reviewed the transit request for following coordinates.
The origin is Louisville, Kentucky (38.23406424942518,-85.7560023665428) and the destination is Columbus, OH (39.9611755,-82.99879419999999).
However, HERE has expanding its coverage and above mentioned coordinated does not comes under HERE coverage report, please check HERE coverage on following link.
Link: https://developers.here.com/documentation/public-transit/dev_guide/coverage.html
Reference URL: GET https://transit.router.hereapi.com/v8/routes?apiKey={YOUR_API_KEY}&origin=41.79457,12.25473&destination=41.90096,12.50243

There is no transit information between your provided Origin and destination in HERE API.
From your sample URL the origin is Louisville, Kentucky (38.23406424942518,-85.7560023665428) and the destination is Columbus, OH (39.9611755,-82.99879419999999).
From Google Maps I see that the available transit route between this origin and destination is through provider Greyhound lines (https://www.greyhound.com/).
This transit provider is not covered in HERE API.
The transit areas and the providers for that area of the HERE REST v8 transit API are defined here - https://developer.here.com/documentation/public-transit/dev_guide/coverage.html

Related

App engine cookie based traffic splitting

Is there a way to use app engine traffic splitting to present a specific version to a selected set of pilot users ? As per the doc below , it seems it provides capability but does not provide how to find what cookie value corresponds to what version
https://cloud.google.com/appengine/docs/standard/java/splitting-traffic
UPDATE : Got the answer from google groups and forums .Consider traffic is spilt based on cookie with version A to receive 40% and version B to receive remaining 60% . So GOOGAPUID cookie values less than 400 will route the traffic to version A , cookie values of 400-999 will route the traffic to version B

Google Street View Premium Plan API - API server rejects your request

I'm trying to switch from basic Google Street View API to Premium. As such, when I'm using:
(space after https is added because I can't post more than two links in the post)
https:/ /maps.googleapis.com/maps/api/streetview?location=40.720032,-73.988354&size=400x400&fov=90&heading=235&pitch=10&key=MY_PREMIUM_API_KEY
I get an image with a Google watermark, which does not scale further than 640x640, same as when using a basic API key.
Okay, to use the advantages of Premium GSV API, I also need to make a digital signature. I've generated a secret key and signed my url (with dropped domain, as said in the tutorial) using python code from there: https:/ /github.com/googlemaps/url-signing/blob/gh-pages/urlsigner.py - it generates just the same signature as one on the Google website: https://developers.google.com/maps/documentation/streetview/get-api-key?hl=en_GB#premium-key
Finally, I add the signature to the URL:
(space after https is added because I can't post more than two links in the post)
https:/ /maps.googleapis.com/maps/api/streetview?location=40.720032,-73.988354&size=400x400&fov=90&heading=235&pitch=10&key=MY_PREMIUM_API_KEY&signature=MY_BASE64_SIGNATURE
However, this is what I get in return instead of an image:
"The Google Maps API server rejected your request. This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console: https://console.developers.google.com/apis/library?project=_"
It cannot be that API project is not activated, as basic API with this project & Premium key works. Any ideas, why does it happen and Premium image download doesn't work?
It appeared to be a purely technical problem, the quotas were exceeded.

USPS Rate API Standard Post get Expected Delivery Date

I searched to see how i can get the expected delivery date for USPS Standard Post.
I have it when i use <ShipDate...> tag, for all other services i receive <CommitmentDate> tag, but for Standard post this tag is missing. Their documentation doesn't tell anything about how to get this date using Rate API. Is it possible, or i have to make another request to different API to get this date?
On their online calculator they return Expected Delivery Day for Standard post service, so there is a way to get it, but how?
Thanks.
You need to access the "Domestic Mail Services Standards" API.
Specifically, you need to send a "StandardBRequest" web services request for the origin and destination zip codes, and will receive the number of in-transit days as a response.

Comparing Google Analytics and Data from our Hosting Provider

Our hosting provider uses an app called AWStats for to give us data about visits/visitors etc. However when I compare that to my google analytics data the numbers are far off. For example AWStats says we had about 5000 visitors but GA says about 1500. How can I uncover the source of the disparity?
A few ideas:
Improper implementation for one or both analytics services
Different definition of what a visitor is for both analytics services. For example, does GA say that you have 1500 unique visitors? or 1500 visits?
Have you tried using a program like HTTPFox to look at the requests getting sent? Are there duplicate requests?

Google Geocoding API - REQUEST_DENIED

Apparently I do not need a 'Maps API key' to use the 'Google Geocoding API' according to:
http://code.google.com/apis/maps/documentation/geocoding/index.html
However, I obtain this:
{
"status": "REQUEST_DENIED",
"results": [ ]
}
Does this mean that my IP is blocked? What can I do to overcome this?
Until the end of 2014, a common source of this error was omitting the mandatory sensor parameter from the request, as below. However since then this is no longer required:
The sensor Parameter
The Google Maps API previously required that you include the sensor parameter to indicate whether your application used a sensor to determine the user's location. This parameter is no longer required.
Did you specify the sensor parameter on the request?
"REQUEST_DENIED" indicates that your request was denied, generally because of lack of a sensor parameter.
sensor (required) — Indicates whether or not the geocoding request comes from a device with a location sensor. This value must be either true or false
Remove the API key parameter and its value.
eg. https://maps.googleapis.com/maps/api/geocode/json?address=[YOUR ADDRESS]&sensor=true
I found that in my case, calling to the service without secure protocol (meaning: http), after adding the key=API_KEY, cause this issue.
Changing to https solved it.
I've noticed that you also get REQUEST_DENIED for some addresses if you don't properly URL encode your address. For example, in
123 Main St #B, Mytown, CA 94110
the '#' character needs to be encoded as %23
For those who are looking this page in 2017 or beyond, like me
Sensor is not required anymore, I tried and got the error:
SensorNotRequired
I just needed to activate my Google Maps Geocoding API, that seems to be necessary nowadays.
Hope it helps someone like me.
If you just copy&paste the example URL that Google gives in their website
http://maps.google.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=true_or_false
it will fail because of the wrong parameter of the sensor. You should change it to true or false and not the one that they wrote.
Maybe is the error that you have had, like it happened to me...
I had this problem and I realized that I was assuming that Geocoding came with the JS maps API. However, it is a separate API which I hadn't enabled in the cloud console. Enabling it fixed it right away.
I got this problem as well using the drupal 7 Location module. Autofilling all empty locations resulted in this error. Executing one of the requests to the location api manually resulted in this error in the returned JSON:
"Browser API keys cannot have referer restrictions when used with this API."
Resolving the problem then was easy: create a new key without any restrictions and use it only for Geocoding.
Note for those new to google api keys: by restrictions they mean limiting requests using an api key to specific domains / subdomains. (eg. only request from http://yourdomain.com are allowed).
It's suck Google don't let you that your service is not enabled by this account. Try to enable it first.
Go here https://console.developers.google.com/project
and create a new project with place service activated this may solve your problem.
If you not have configured a billing account with your credit card, the API do not work. The Google is now very hungry for money and not open more your products "free". Obviously that him offer a free limited access number of consults and over this acces, the billing is very high.
https://cloud.google.com/maps-platform/pricing
As you say, this can mean that your IP address has been blocked. I'd make sure that you specify the key parameter on the query string for the Geocoding API request.
https://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=Placename&key=XXxxxXXxXxxxxXXxx
Also make sure that if you've set up IP Address Restrictions within the Developer Console, you've allowed the correct IP address, just click the project within the list and you'll see the allowed IPs.
If you're still running into issues, you might want to look into printing out the values of the status and error_message elements from the response from Google, you'll see something like this:
REQUEST_DENIED - This IP, site or mobile application is not authorized to use this API key. Request received from IP address 123.4.5.678, with empty referer
If it doesn't mention an IP address restriction, it may well give you enough information about the problem to Google a fix.
For anyone struggling with this issue, I just found out that the Geocoding API can't be used with API keys that have referrer restrictions. Just remove all your referrer restrictions and you should be good.
If you're using any other APIs that do allow keys with referrer restrictions (like the Maps JS API), it's probably best to create a 2nd key with no restrictions to use exclusively for geocoding, because other APIs might display your key publicly and someone else could start using it on their own site.
Google is returning a very useful error message, which helps to correct the issue!
Dim Request As New XMLHTTP30
Dim Results As New DOMDocument30
Dim StatusNode As IXMLDOMNode
Request.Open "GET", "https://maps.googleapis.com/maps/api/geocode/xml?" _
& "&address=xxx", False
Request.Send
Results.LoadXML Request.responseText
Set StatusNode = Results.SelectSingleNode("//status")
Select Case UCase(StatusNode.Text)
Case "REQUEST_DENIED"
Debug.Print StatusNode.NextSibling.nodeTypedValue
...
Error Message Examples
Message 1:
Requests to this API must be over SSL. Load the API with "https://"
instead of "http://".
Message 2:
Server denied the request: You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please ...
If none of given solutions fixed the error, the issue probably about Google Cloud Billing settings. You must enable Billing on the Google Cloud Project at billing/enable.
Learn more
{
"error_message" : "You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started",
"results" : [],
"status" : "REQUEST_DENIED"
}
I created another Credential(New API) only for Geocoding, with "Key restrictions" 'None' and "API restrictions" 'Restrict key'
Selected APIs:
Directions API
Geocoding API
Geolocation API
Maps JavaScript API
Places API
and then it's worked.
I just ENABLED my geocoding API, geolocation API and places API on my google cloud platform (where I had generated my API key I was using) and it worked.

Resources