Crashing browsers :)

126 views
Skip to first unread message

THE_AI

unread,
Jul 9, 2011, 7:18:25 AM7/9/11
to Google Maps JavaScript API v3
Hey guys,
I have finally released my joomla component - hotspots :). Here is the
demo:
http://demo.compojoom.com/hotspots

I got few users complaining that when they click on a marker in street
mode, they don't see the infoWindow. The infoWindow opens, but in the
map plane and not the street map plane.

So, after reading the documentation about Overlays with street map:
https://code.google.com/apis/maps/documentation/javascript/services.html#StreetViewOverlays

I've corrected my createInfoWindow function to this:

createInfoWindow: function(marker, hotspot) {
return (function() {
var container = this.infoWindowToolbarActions(hotspot);
var text = new Element('div', {
style: 'width: 300px;',
html: hotspot.description
});
container.inject(text);
this.infoWindow.setOptions({
'content': text ,
'position':new google.maps.LatLng(hotspot.latitude,
hotspot.longitude )
});

var panorama = this.map.getMap().getStreetView();
if(panorama.getVisible()) {
this.infoWindow.open(panorama,marker.markerObj);
} else {
this.infoWindow.open(this.map.getMap(),marker.markerObj);
}


}.bind(this));
},

now when I'm street mode and I click the marker, the infowindow shows
in street mode. If I close the infowindow and after that close the
street mode, then click on the infowindow in map view - everything
works fine.

But if leave the infowindow open in street mode and just close the
street mode, then try to open the infowindow in the normal map view,
the browser just crashes. I've tested it with firefox and chrome.

In firefox the first time I try it, I get this message:

A script on this page may be busy, or it may have stopped responding.
You can stop the script now, open the script in the debugger, or let
the script continue.

Script: http://maps.gstatic.com/intl/en_us/mapfiles/api-3/5/9/main.js:53

and firebug's console shows this:

uncaught exception: 2.9828892165819886e+144

The second time I try it, it just crashes...

In chrome it chrashes already on the first time.

You can test the behavior here:
http://labs.compojoom.com/index.php/hotspots

Any ideas? Am I doing anything wrong? Should I automatically destroy
the infoWindow when switching between street mode and normal map mode?

en4ce

unread,
Jul 9, 2011, 10:57:23 AM7/9/11
to Google Maps JavaScript API v3
i wonder if that component is against the TOS of google maps because
you want ppl to pay for that component...

12-Month subscription for Hotspots
• €39 EUR ≈ $49.53 USD
• 365 Days

http://compojoom.com/subscriptions-a-downloads

On 9 Jul., 13:18, THE_AI <danielsd...@yahoo.fr> wrote:
> Hey guys,
> I have finally released my joomla component - hotspots :). Here is the
> demo:http://demo.compojoom.com/hotspots
>
> I got few users complaining that when they click on a marker in street
> mode, they don't see the infoWindow. The infoWindow opens, but in the
> map plane and not the street map plane.
>
> So, after reading the documentation about Overlays with street map:https://code.google.com/apis/maps/documentation/javascript/services.h...

THE_AI

unread,
Jul 9, 2011, 12:48:44 PM7/9/11
to Google Maps JavaScript API v3
No, it is not. I've read the TOS many times... You are allowed to ask
money for your product as long as the map is publicly accessible.

THE_AI

unread,
Jul 10, 2011, 4:59:43 AM7/10/11
to Google Maps JavaScript API v3
Ok, I was thinking that the problem is somewhere in my script (the
abstraction that I'm making with the MooGooMaps library) so I created
just a simple html page with a map and few markers on it to debug.

Example1:
http://labs.compojoom.com/experiments/infowindow.html
- here everything is working! I don't use a single infowindow object -
the browser is not crashing

Example2:
http://labs.compojoom.com/experiments/infowindow_single.html
- here the browser is crashing. The difference with example 1 is that
I use a global infowindow object. And I was wrong. You have to click
on 2 markers in streetview mode and the browser is crashing( you don't
have to change between standard map mode and street view)

Daniel

Rossko

unread,
Jul 10, 2011, 5:50:53 AM7/10/11
to Google Maps JavaScript API v3
> Example2:http://labs.compojoom.com/experiments/infowindow_single.html
> - here the browser is crashing.

Doesn't crash for me in FF2.
The Bus marker does not produce any infowindow on click.
The bus marker has no click listener.
You have attached a listener to the icon image, rather than the
marker, which may give odd results in your browsers I suppose.

THE_AI

unread,
Jul 10, 2011, 6:33:50 AM7/10/11
to Google Maps JavaScript API v3
Sorry for that. I've attached the listener to the marker now. (updated
example2 http://labs.compojoom.com/experiments/infowindow_single.html
)

Browser that I've tested it on and that crash:
Safari 4.0.3
Internet Explorer 9
Firefox 5
Opera 11.10
Chrome 12.0.742.112

- that are all the browsers on my win7 system and they all crash in
street view mode when I click 2 markers.

I'll try to test on some other systems and let you know.

Daniel

THE_AI

unread,
Jul 10, 2011, 7:08:00 AM7/10/11
to Google Maps JavaScript API v3
Ok, I can confirm that it is not only my system. I've tested it on
another win7 with IE9 and on Mac with safari. Both browsers crashed.

Steps to reproduce:
1. go in streetview mode
2. click on a marker
3. turn around and click on another marker

Luke Mahé

unread,
Jul 10, 2011, 8:36:55 PM7/10/11
to google-map...@googlegroups.com
Thanks for reporting this, we're looking into it.

-- Luke



--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


THE_AI

unread,
Jul 15, 2011, 8:59:05 AM7/15/11
to Google Maps JavaScript API v3
Hey Luke,
Any light on this? Is it a confirmed bug, or did I did something
stupid?
Kind regards,
Daniel
Reply all
Reply to author
Forward
0 new messages