On our website, we have a store locator using Google Maps. Users can also plan a route to a store and print it. To open a print view, we used URL parameter pw=2 successfully, but since a few days/weeks the param leads to a 404 page.
Example:
http://maps.google.com/maps?saddr=74321&daddr=70378 works, whereas
http://maps.google.com/maps?saddr=74321&daddr=70378&pw=2 leads to a 404.
Does anybody know a workaround or a substitute for the pw=2 param?
Related
I have the Google Picker API implemented in an application, with the Google Drive view included. Currently, entering a search query in the search bar of the Google Drive view starts showing a drop-down with some file results included, like this:
search bar drop down
However, clicking the "magnifying glass" search button, or pressing enter, or clicking "search for all items containing...", all results in an empty picker, like this:
empty picker with no search results
I believe this is occurring because a call to https://docs.google.com/picker/pvr is returning this error as a response every time: &&&START&&&{"error":true,"errorMessage":"Internal error"}.
The parameters being sent to that /pvr endpoint are here:
start: 0
numResults: 50
sort: 3
desc: true
q: testing
cursor:
mine: 2
service: docs
type: NOT_COLLECTION
options: {"ff":true,"filterTeamDriveResults":true}
token: J********
version: 4
app: 2
clientUser: 1************
developerKey: A*************
subapp: 5
What I found is that manually removing the "filterTeamDriveResults":true key from the "options" hash and doing an ajax post directly resulted in a successful request, but for whatever reason that option is included with every request from the picker, and any time a request is made with that option included, it seems to fail with the same "Internal error" response. I'm wondering what the source of that option is, and if there's any way to remove it from our picker. As far as I can tell it doesn't seem to be controlled by any of the options in the JavaScript API that we're loading from https://apis.google.com/js/api.js?onload=onApiLoad.
This started happening to us last week as well after having been using the Google Picker API for years without any issues. Your clue about the filterTeamDriveResults key reminded me of something I had just read, about upcoming changes to the Google Drive API and Google Picker API:
Next, we’re introducing a new Drive API resource collection, called “Drives,” to replace the “Team Drives” resource collection. This new resource collection can help you create, delete, get, list and update your shared drives, and features all the same fields, resources and available methods as the “Team Drives” resource collection. If you have been using the “Team Drives” resource collection in your applications, consider migrating as soon as possible as all related fields for Drive API , Drive Activity API and Google Picker API, will no longer be supported starting June 1, 2020.
It doesn't seem related, at least not directly, but made me think that perhaps, the SUPPORT_DRIVES feature that I had seen here in the docs, could "disable" that other teamDrive feature (even though it's not really that, but still...). And indeed, that fixed it. Basically just:
new google.picker.PickerBuilder().
setAppId(appId).
addView(new google.picker.DocsView().setIncludeFolders(true)).
enableFeature(google.picker.Feature.SUPPORT_DRIVES)
...
One thing to notice is this warning when enabling this feature:
Before enabling this make sure to refer to Google Drive API documentation for enabling shared drives and make any necessary Drive Rest API changes.
Might be relevant in your case.
I have successfully added JSON code to my job listings so they now appear on Google Jobs.
The problem is many of the URLs for the jobs have incorrect wildcard subdomains such as:
https://mail.mywebsite.com
https://ww.mywebsite.com
Wildcards/subdomains are not covered by my SSL certificate, so when you click these links a warning page appears to say that the website has been improperly configured and to proceed with caution.
It seems to be picking these wildcard URLs up from Google search results instead of taking the URL of the actual page. I have added the 'URL' property to the code but it seems to ignore it.
Is there another property I can add to the JSON code to get Google to use the proper URL?
I am using SugarCRM with several registered accounts.
Each of the accounts have registered billing addresses and related information that are thrown into an embedded google map as parameters and displayed under a tab called Location Map.
The embedded URL looks like this:
https://www.google.com/maps/embed/v1/place?key=AIzaSyC1AkgX6WPT3_arbJZTQtLYkT_bz0rz5oQ&q={billing_address_street},
{billing_address_city}, {billing_address_postalcode}, {billing_address_country}
This works fine for some addresses but it returns an error (The Google Maps API server rejected your request. Invalid request. Missing the 'q' parameter.) when using others.
Link to a comparison, the second URL is invalid
The second link is invalid since it has amp; where it isn't supposed to be. Does somebody know why this happens and how I can prevent it?
Unfortunately, we didn't know what caused this problem but we settled on solving this issue by formatting the embedded URL explicitly.
So, I've gotten to the point in my app where I can retrieve a list of spreadsheet documents from a user's Google Drive account by using the Google Spreadsheet API. I populate the file list in a ui control that users can click on to then retrieve the list of its worksheets. It's working as expected in some cases, but in others it is not. In my request, I use the url that comes back from the file list, and even so, the API responds with:
Sorry, the file you have requested does not exist.
Make sure that you have the correct URL and that the owner of the file hasn't deleted it.
Well, surely the file wasn't deleted. I got it back in the response to my request for the files list. I also can get to the file via a normal web browser. Also, the URL is correct because that's the one the API responded with. My code does not manipulate the url that comes back in that initial files response. In fact, here is the URL that is used to grab the worksheets:
https://spreadsheets.google.com/feeds/worksheets/{long key here}/private/full
So, my question is why does my request for some worksheets come back with a response with the actual list of worksheets, but on others (which I have access to, and I know exists) I get the faulty response.
Thanks,
Arie
My app is using OAuth 2.0 and I ran into the same error with new Google Sheets. What fixed that was making a change in scope param sent during OAuth's authorize call and then reauthorising (reinitiating OAuth flow and obtaining new tokens).
Until now scope in my app was just:
https://spreadsheets.google.com/feeds
Updated scope and solution to the issue in my case:
https://spreadsheets.google.com/feeds https://docs.google.com/feeds
I'm running into this in my own stuff. At least for what I'm running into, it seems to be an issue with New Sheets. I'm sorry to not have more of a solution (I'm still trying to find out what to fix on my end) but this may help you narrow down the issue.
I'm building out an API and have a question about how to track/know which domains use the call after the KML gets picked up by Google's servers for rendering.
So, for example, my domain that is serving up the KML file is called kml.example.com from a PHP API. Someone on the domain www.metromapper.org builds a page that creates a Google map and then calls my file using Ajax to overlay my data on their map. Google grabs that KML file, then serves it back to the user.
Here is that example in action: http://www.metromapper.org/example/apitest.htm
(Click the center map marker to see a popup of all the PHP server variables available to the kml.example.com script.)
Since Google is grabbing it, I can't use the PHP variables REMOTE_HOST or REMOTE_ADDR to get the metromapper.org site info. They only tell me Google's IPs.
So is there some other way to get this data? Does Google happen to return it in the header somewhere? Any ideas on how to track or pass the originating remote host name around so I can get it when the call is made? Thanks, I realize this might not be solvable.
FYI, I posted this question too, but it was before I knew it was Google's IP in the REMOTE_HOST.
You could construct your KML URL like so:
var layer = new KMLLayer("http://yoursite.com?caller=" + window.location.host);
Your server will then get passed the hostname of the current page as a CGI parameter, which it can record.
Note that this has implications for caching—every site which embeds your KML file will append a different caller parameter, so Google will not be able to share cached copies of the KML between multiple sites. This may impact performance.
A better strategy may be to make an AJAX call to your domain each time someone loads the KML file, e.g.:
var layer = new KmlLayer("nice_cachable_url");
LogQuery(layer, window.location.host);
LogQuery would use AJAX or a similar technique to send the KML Layer ID and current host name to your server. Your server can then track this.
It looks like this is not possible FYI. There is no way to pass a chunk of data like this to Google's API and get it back in the data all.