I'm using this library for using google maps with delphi: GMLib
This has worked fine for several months, but today when I started my application I got a lot of script errors on the page and everything broke down!
After troubleshooting all day I have concluded that this is outside of my control. To demonstrate this you only need to build & run the demo project as it demonstrate the exact same problem (loads of script errors).
The only reasonable explanation is that the js files that the library loads from the Internet has changed. However this is very hard to pinpoint.
I'm hoping the developer of the library sees this as I'm completely lost on how to even start adressing this.
base on this article
Google Maps JS API (v3) InfoWindow Script Error - JSON Undefined
Delphi's solution step is
modify map.html
rebuild gmmapres.rc(use brcc32.exe)
rebuild GMLib_DXE5.dproj
rebuild your project
You can download the newest version 1.5.4 from 1.5.4
Related
First I have to apologize because English is not my native language and also because I'm just starting in developing. Sorry for all of that.
My question is that when I deploy my app script as a web app the page does not work; but when I used the "Test web app for your latest code" it does work. I don't understand why in the first case (the url finishes with a \exec) appears an error and in the second works nice (the url finishes with a \dev).
The Google Drive error is : The file cannot be opened at this time. Please check the address and try again.
I'm so confused because the web app was working nice, and suddenly it started to show that error, but I did not change anything in the code.
I don´t know if it is related with permissions. I've tried to create new versions but it does not solve it.
Any idea how can I solved it?
One of our production pages stopped working properly.
Tracked it down to the fact that one of the dependencies does not exist anymore:
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/src/infobox.js
This URL is used in most of the example codes that were the basis of the webpage.
This is probably easily solved but a quick google showed no one has noticed this, I think it has happened in the last hour and just wanted to put the information out there in case people are panicking.
It seems that the library is being moved to Github (it seems the infobox.js wasn't moved yet), see the announcement on main page: https://code.google.com/p/google-maps-utility-library-v3/
But still, the problem with your code is that it's not a good practise to reference code from code.google.com svn repository. It's like referencing a code from Github, it can be changed/moved/removed any time. You should either download the code and include it in your project as .js file or host it yourself on some CDN server.
UPDATE
The google utility library (including infobox) is hosted here on github now. As said before, it's not mean to be referenced from there in projects.
As Google moved the source over to GitHub a while back, the new GitHub version can be accessed from RawGit by using the following script urls (standard and packed versions):
https://cdn.rawgit.com/googlemaps/v3-utility-library/master/infobox/src/infobox.js
https://cdn.rawgit.com/googlemaps/v3-utility-library/master/infobox/src/infobox_packed.js
Whilst the above urls (with the cdn prefixes) have no traffic limits or throttling and the files are served via a super fast global CDN, please bear in mind that RawGit is a free hosting service and offers no uptime or support guarantees.
Accessing files maintained via GitHub is covered in more detail in the following SO answer:
Link and execute external JavaScript file hosted on GitHub
This post also covers that, if you're linking to files on GitHub, in production you should consider targeting a specific release tag to ensure you're getting a specific release version of the script.
For example, you could target the 1.1.13 release of the InfoBox library with the following script urls (standard and packed versions):
https://cdn.rawgit.com/googlemaps/v3-utility-library/infobox/1.1.13/src/infobox.js
https://cdn.rawgit.com/googlemaps/v3-utility-library/infobox/1.1.13/src/infobox_packed.js
Alternatively, you could download and include the library directly in your project for production purposes.
As an emergency fix I copied the code from here:
https://code.google.com/p/google-maps-utility-library-v3/source/browse/trunk/infobox/src/infobox.js?r=466
and linked locally. This appears to work fine for a quick fix but I will need to look for an alternative that see active updates.
Google code is apparently shut down per the announcement
Bidding farewell to Google Code
Thursday, March 12, 2015
January 25, 2016 - The project hosting service is closed. You will be able to download a tarball of project source, issues, and wikis. These tarballs will be available throughout the rest of 2016.
Certainly wasn't clear from the post that they were going to stop making the hosted code available for use externally.
Managed to get back the Infobox (v.1.1.13) script from the browser cache.
Can be downloaded from http://pastebin.com/PGciVVur, hope this helps someone
I linked to this github repo that seems to be a similar one and my site works again:
https://raw.githubusercontent.com/oytunyuksel/Google-Maps-Infobox.js/master/src/infobox.js
It appears that markermanager.js is no longer available on googlecode.com which has been closed. I have looked for an equivalent on Github, but so far without success. I can find marker-clusterer etc. but my code is built to run with markermanager.js.
Can anyone tell me where it has gone, please?
Following Google's move of the source, the new GitHub version can be accessed via jsDelivr (a content deliver network with no bandwidth limits that's focused on performance, reliability, and security) by using the following script urls (standard and packed versions):
https://cdn.jsdelivr.net/gh/googlemaps/v3-utility-library#markermanager/1.2/markermanager.js
https://cdn.jsdelivr.net/gh/googlemaps/v3-utility-library#markermanager/1.2/markermanager_packed.js
These urls specifically target the 1.2 release of the markermanager library - as covered in the following SO answer, in production you should consider targeting a specific release tag to ensure you're getting a specific release version of the script:
Link and execute external JavaScript file hosted on GitHub
Alternatively, you could download and include the library directly in your project for production purposes.
In the newly published version of my app that is using Google Maps Android API V2, I've implemented all the things suggested by the developer guides to ensure the user has GooglePlayServices installed, and it has been working well on all the devices I own and the several hundred people that have updated to the new version of the app so far.
Today I received a bug report via acra with a strange error. This is happening on the following line of code, after setupMapIfNeeded() has completed:
mMap.setMyLocationEnabled(true);
Logcat reports:
W/GooglePlayServicesUtil(10401): Google Play Store is missing.
Shouldn't the call to GooglePlayServicesUtil.isGooglePlayServicesAvailable() also ensure that the Play Store is installed? That seems like a huge oversight on Google's part if it doesn't.
Any help is appreciated.
In case someone came here by accident or was just wondering why it was not working...
This could happen when user had old Android Market installed, which was replaced by Google Play Store.
Here is relevant issue: http://code.google.com/p/gmaps-api-issues/issues/detail?id=4862 (fixed in february update).
Long ago I've setup a Google Maps project using the old API version(v2). I know Google Maps API v2 is being deprecated and I'm working on rewriting it for the new version, but I need this working until then.
Suddenly, the map stopped working throwing this error in an alert box:
Google has disabled use of the Maps API for this application. This
site is not authorized to use the Google Maps client ID provided. If
you are the owner of this application, you can learn more about
registering URLs here:
http://code.google.com/apis/maps/documentation/premier/guide.html#URLs
I haven't changed anything in the current app and the requests per day are less than 1000(way far from the daily quota). The first thing I've noticed is that there was no allowed referrers specified. But even after they was set to(replacing sitename.com with my domain):
sitename.com
sitename.com/*
www.sitename.com
www.sitename.com/*
*.sitename.com
*.sitename.com/*
There was no result whatsoever even after couple of hours. The reason why this application suddenly stopped working is still a mystery to me (once again - nothing has been changed in my code or the google account), but most importantly I need really fast solution.
Any ideas?
Sounds like you might be using v2.x. There was a release of v2 very recently. If you aren't using v2.s; you might try that (or v=2) to see if it resolves your problem (for now, they have gone to a 2 week upgrade cycle on v2: "We have updated v=2.x to 2.441. v=2 will be updated in 2 weeks and v=2.s will be updated in 4 weeks.")