MichaelWiss / geo-location-javascript

Automatically exported from code.google.com/p/geo-location-javascript
0 stars 0 forks source link

Google Gears API is retired so gears_init.js 404's #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Include the <script src="http://code.google.com/apis/gears/gears_init.js" 
type="text/javascript"></script><script 
src="http://code.google.com/apis/gears/gears_init.js" 
type="text/javascript"></script>
<script src="geo.js" type="text/javascript" ></script>
2. Load the page

Expected output is for the scripts to include and things to work.  But instead 
the script will fail to load as it's 404 at Google.

Using 0.4.7 on Linux.

Is there an alternative to gears that can be used, or does this mean a rewrite?

Original issue reported on code.google.com by damien.n...@gmail.com on 8 Apr 2012 at 4:59

GoogleCodeExporter commented 9 years ago
Finding a cached copy of gears_init.js, from sources such as this:  
http://developer.yahoo.com/yui/docs/gears_init.js.html  and then saving that to 
your local webserver and including from there appears to work around the 404 
error.  I'm not sure that Gears is still working beyond that, but no more 
error.   

I don't see anything in the license terms at the top of gears_init.js about it 
expiring, and so I've attached it here.

Original comment by damien.n...@gmail.com on 8 Apr 2012 at 6:43

Attachments:

GoogleCodeExporter commented 9 years ago
Shall we simply add the content of the file to geo.js to solve it? 

Original comment by whoiss...@gmail.com on 9 Apr 2012 at 3:14

GoogleCodeExporter commented 9 years ago
I suggest we just add the gears_init.js file to ip-geolcation-javascript.zip 
and change the instructions to reference it locally like geo.js.

According to the comments at the top of gears_inis.js, we can reidstribute it 
however, as long as we leave the comments / license terms there.

But adding it to geo.js would work as well.. whatever you think is better!

Original comment by damien.n...@gmail.com on 9 Apr 2012 at 3:36

GoogleCodeExporter commented 9 years ago
added it to geo.js, all files are committed. Care to have a look?

Original comment by whoiss...@gmail.com on 17 Apr 2012 at 10:10

GoogleCodeExporter commented 9 years ago
Sorry for the delay testing this - I tested on a real site and it looks great 
from my end!  

This approach should restore functionality without any changes required for 
people who don't spot the 404.  Thank you for the prompt fix!

Original comment by damien.n...@gmail.com on 19 Apr 2012 at 5:08

GoogleCodeExporter commented 9 years ago
Thanks so much:) Added a new download.

Original comment by whoiss...@gmail.com on 19 Apr 2012 at 9:29

GoogleCodeExporter commented 9 years ago
I am experiencing the same error. Where do I need to add the gears_init.js file 
and how can I reference it to make the error disappear?  Thanks

Original comment by ma...@mazzerioli.com on 2 May 2012 at 2:16

GoogleCodeExporter commented 9 years ago
I just commented the call in
./sites/all/modules/smart_ip/modules/device_geolocation/device_geolocation.modul
e:   

//drupal_add_js('http://code.google.com/apis/gears/gears_init.js');

Thanks.

Original comment by ma...@mazzerioli.com on 2 May 2012 at 5:15

GoogleCodeExporter commented 9 years ago
@mauro: this works. i also updated geo.js to include the gears js file, its 
added on top of the file, its really small. use this.

Original comment by whoiss...@gmail.com on 2 May 2012 at 12:17