MozillaZine

My own Google Map icons are not visible in Firefox 8

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
nico.mollet
 
Posts: 4
Joined: November 28th, 2011, 4:11 am

Post Posted November 28th, 2011, 11:18 am

jscher2000 wrote:
nico.mollet wrote:Now Dropbox is pretty useless on Firefox8, should Dropbox change his policy just for Firefox8 ?

Could you describe the scenario where Dropbox doesn't work?


1/ Here is an icon file on Dropbox public folder : http://dl.dropbox.com/u/15052756/mapico ... _0star.png everyone can see this one
2/ Now go to http://maps.google.com/maps
3/ Create a map
4/ Create a place
5/ Add a custom icon to the new place, with the Dropbox URL : http://dl.dropbox.com/u/15052756/mapico ... _0star.png
6/ Add a name a description to place, then save the place
7/ The icon/image won't appear

I shared a map following this example : it works on Chrome, Firefox7 & IE8, but not on Firefox8 :
http://maps.google.com/maps/ms?ie=UTF&m ... bd18a30a34

I tried to add an htaccess file (Header set Access-Control-Allow-Origin *) on my Dropbox folder, nothing changed.

jscher2000

User avatar
 
Posts: 11094
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted November 28th, 2011, 4:56 pm

I see what you mean. I don't have any public folders so I hadn't thought to try that. A good question to pose to Dropbox support.

nico.mollet
 
Posts: 4
Joined: November 28th, 2011, 4:11 am

Post Posted November 28th, 2011, 5:31 pm

@jscher : actually, I figured out, not only Dropbox, but Google Sites, Google Code (any file sharing service) files can't be linked anymore in Google Maps, because Firefox won't display them. It's not just a Dropbox problem.

For me, Google Maps is not interpreting well the new security rules of Firefox (of the contrary).

jscher2000

User avatar
 
Posts: 11094
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted November 28th, 2011, 7:19 pm

nico.mollet wrote:I shared a map following this example : it works on Chrome, Firefox7 & IE8, but not on Firefox8 :
http://maps.google.com/maps/ms?ie=UTF&m ... bd18a30a34

As an end-user workaround, this Greasemonkey userscript will display the images on Google Maps:

Code: Select all
// ==UserScript==
// @name           Google Maps Strip CrossOrigin From Images
// @namespace      YourNameHere
// @description    Remove crossorigin attributes from images and refresh them
// @include        http*://maps.google.com/maps/*
// ==/UserScript==
function stripCrossOrigin(){
  var imgs = document.querySelectorAll('img[crossorigin]');
  for (var i=0; i<imgs.length; i++){
    imgs[i].removeAttribute("crossorigin");
    imgs[i].src = imgs[i].src;
  }
}
stripCrossOrigin();
window.setInterval(stripCrossOrigin, 2000);

(Not sure the setInterval is necessary, but if new icons are added as you pan the map, it might be.)

nico.mollet
 
Posts: 4
Joined: November 28th, 2011, 4:11 am

Post Posted November 29th, 2011, 4:34 am

Thanks for the GreaseMonkey script.

Of course, it will display the images for me. But not for my users seeing my public maps.

At the moment, every user using Firefox8 can't use & can't see others people custom markers. There must be something Google can do.

jscher2000

User avatar
 
Posts: 11094
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted November 29th, 2011, 10:34 am

Yes, I realize it's an individual end-user workaround, not a solution.

nico.mollet wrote:There must be something Google can do.

I assume they suggest the Chrome browser. ;-)

(But yes, it should be your option whether to require the crossorigin attribute on images.)

Return to Web Development / Standards Evangelism


Who is online

Users browsing this forum: No registered users and 1 guest