Google Maps Gadget Not Working - javascript

I'm not sure of the specific day, but on our company site, the Google Maps Driving Directions Gadget no longer functions, i.e. it is no longer accepting input and autoexpanding the directions. This is the standard gadget found at http://maps.google.com/help/maps/gadgets/directions/. I was just curious if anyone else is experiencing this issue, or is there a known conflict with jQuery or any other popular scripts?

This seems to be an issue that is not only related to your site. We had the directions widget on a test server and it used to run fine. Last week I noticed it would not expand in IE and FF anymore, Chrome however is working fine.
I did some searching around on the net and there are other people having the same issues:
Google support page
Another Google support page
So this seems to be an issue with the Google code and we need to wait for them to fix it.

Related

JavaScript stops working for all Google Sheets and Docs

My Google Docs and Sheets were working fine yesterday. Today, the same file (no changes made) does not run my JavaScript. In fact, any new Doc/Sheet files I create will no longer run JavaScript. It appears that Google itself is blocking JavaScript on my Google account, but I am not sure. There is no error message, no log. I thought it was a device issue, because it started working again on my new devices but, eventually, all my devices have stopped working. Note: My devices have different operating systems, different browsers, but all eventually experience this issue. I tried reinstalling browsers, new Windows installs. Note: even simple JavaScript alert popups will no longer work from my Google files. General web browsing (outside of Google Workspace development) is running good. I am so confused!
I am going to close this question. I have discovered that google has intentionally removed alert and other javascript features - more information at this link: https://www.chromestatus.com/feature/5148698084376576
I will have to find another way to implement the javascript alert functionality. Thank-you all for any consideration you gave my question.

Get CPU Usage detail in browser [duplicate]

I noticed this today in my Chrome.
Google Meet is showing a chart of CPU usage in their "Troubleshooting" panel. I'm wondering if there's an existing API for this or is it a clever trick I'm not aware of.
I was curious about this as well when I saw the CPU Usage graph on the Troubleshooting page on the Google Meet's page. So googled a lot and I couldn't find any proper answer as to how it is being achieved apart from this link: https://developer.chrome.com/extensions/system_cpu#method-getInfo.
So, I went through the minified source code of the Google Meet's site and it turns out Google Meet is using this but not on their webpage directly, because it is for chrome extensions only, but through the Google Hangouts Extension which is present in Chrome, Brave and the new Microsoft Edge (Chromium-based).
The chrome extension is calling the chrome.system.cpu API to get the information about the processor, core count, temperatures, etc., and these details are being passed to the Google Meets page via window.postMessage API and Message Passing between Chrome Extension and a Webpage.
This is a neat little way to achieve this if you are the creator of the browser :P.
Most probably, they are using Chrome specific API since this will not work on other browsers.
The closest thing that I've found is https://developer.chrome.com/extensions/system_cpu#method-getInfo
Below is a screenshot from Firefox stating that this will work only on Chrome.

Google Maps Javascript API stuck in lite mode

Since one week, my project website is stuck with the lite mode by default.
The problem is when we zoom fast in the map, we see some spike lag.
Mostly in chrome and mobile. In firefox i dont see much spike lag.
To see differences between lite mode and full mode :
full mode : https://www.google.ca/maps/#45.503366,-73.5853116,13z?hl=en
lite mode : https://www.google.com/maps/#45.4754748,-73.5526631,12z?force=lite
I'm not the only one who get stuck with that problem. Here example
padmapper dat com
kangalou dat com
There is one week, if my memory is good was all in full mode, now in lite mode.
Me and kangalou website have this new warning i didnt have last week.
Google Maps API warning: NoApiKeys
i had this one but whatever..
Google Maps API warning: SensorNotRequired
I created my API key etc but i'm not sure where tu put that parameter.
I'm not sure that without the API key now we get stuck in lite mode, i take a guess, maybe it's not that.
The Google Maps JavaScript API doesn't have a 'lite' mode like the desktop website # google.com/maps does. The Google Maps JavaScript API doesn't support the full 3D-experience that google.com/maps can provide and usually looks and acts much closer to the 'lite' mode you've seen using so it's easy to confuse the two.
The warnings you are experiencing, like not using an API key or using the unneeded sensor parameter sound like you should work through the getting started guide to make sure you're following the latest best practices.

Google Maps Draw Route malfunction in Windows

tldr: recently, my use of the Google Maps JavaScript API v3 does not show routes or markers anymore. It works fine on my Debian-box, but not on any Windows computer I tried (ranging XP to Windows 8). Has there been a recent change in the API? Is my code buggy? see http://pastebin.com/ubRGPtDZ
Dear All,
in August 2014, I wrote a Qt program that at some stage shows Google Maps in a QWebView . Through JavaScript I was able to draw a route.
This program has been functioning fine, up to mid-December. On my Linux-box (Debian), it still works fine, but on every Windows computer I try, stops showing the route. Google Maps itself shows fine, but it stops showing any route, any marker, ...
Did anything change in Google Maps mid-December 2014? I checked the changelog of Javascript Maps API v3 , but I do not see any new mention after September 2014.
Should I check somewhere else?
Or is there any change in QWebView-behaviour on Windows-boxes since mid December? Is that even possible?
I still hold possible that my JavaScript tweaking is inadequate, so I will debug that code as well, but definitely baffles me that everything worked fine for over 4 months on Windows-computers, and still does on my Debian-Box. I have put it online at http://pastebin.com/ubRGPtDZ .
My apologies for any bad English, non-native speaker here.
Thank you all for any suggestion.
Wim
Found it! This was a very frustrating challenge, but it feels great now that it is solved. It took me days of browsing through any documentation possible, of pure trial-and-error, testing and doubting every aspect of my code or even configuration, all failed... But one more time I browsed the qt-project and found this post by lowsnr and Yuvalal.
In the words of lowsnr:
as part of the test that the Google code performs to determine
whether the browser is touch enabled, it checks the User Agent for
Chrome >= 5.0, so by changing the user agent to something like
‘Chrome/1.0’ the touch interface suppressed.
Apparently it is also needed for displaying the directions (*). So I wrapped up a new class called myWebPage and derived it from qWebPage:
class myWebPage : public QWebPage
{
virtual QString userAgentForUrl(const QUrl& url) const {
return "Chrome/1.0";
}
};
and before loading the HTML in the qWebView, I use setPage():
ui->setupUi(this);
ui->webView->setPage(new myWebPage());
ui->webView->setHtml("...");
Now it works like a charm :-)
--
(*) For me, the prove that the problem was not my JavaScript, is that I tried to simply load the same HTML script as used in the Google Maps code examples. In a QWebView, it works fine for my Linux-box, but refuses to show the directions on any Windows-compiled binary that I tried. Still, the code works fine if you load to a regular browser.
Conclusion: Google Maps does not necessary like QWebView.

Debug Google Maps API stack overflow in iOS Safari

I have a site at localgp.com that uses Google Maps API v3 on the search results page. (Follow one of the location links on the front page.) The problem is, on mobile safari (both iPhone and iPad), a javascript error occurs somewhere within the API, but it works just fine on all other browsers I'm interested in targetting including Safari on Mac and PC.
The offending javascript:
http://maps.gstatic.com/intl/en_us/mapfiles/api-3/5/11/main.js
Lines error occurs:
26, 28 and 27
Error message:
RangeError: Maximum call stack size exceeded.
My questions:
In the short term, might anyone know what's going on here and how it might be solved?
Longer term, how would I go about debugging javascript errors on mobile safari if at all possible?
It seems that if you use the 'bounds' option it causes this problem.
We discovered that when bounds was set to true, the google code was calling fitbound() over and over.
Im not sure if bounds will have a big impact on the map but it was in the tutorial so its a bit peculiar this hasn't been spotted before.
Hope that helps!

Categories

Resources