New release appears to have introduced bug in "google.maps.event.trigger(map, 'resize')"

48 views
Skip to first unread message

Peter Lawless

unread,
Aug 17, 2010, 6:18:53 AM8/17/10
to google-map...@googlegroups.com

I have posted 2 examples of triggering a resize event.

 

http://www.lawless.info/gmaps/resize.html

 

The first one simply has a button to resize the map and StreetView is not enabled.  This works fine.

 

http://www.lawless.info/gmaps/resize_StreetView.html

 

The second example differs only in that the map has “ streetViewControl: true “ set in the options.  Without even looking at StreetView resizing the map causes the following error

 

Error: e is null

Source File: http://maps.gstatic.com/intl/en_gb/mapfiles/api-3/2/1/main.js

Line: 67

 

This code, which was built into my application development, was working on Sunday.

 

Can those who know tell me is this a real bug which should be reported or am I doing something stupid?

 

Thanks

 

Pete

William

unread,
Aug 17, 2010, 7:17:32 AM8/17/10
to Google Maps JavaScript API v3
On Aug 17, 8:18 pm, Peter Lawless <pjl.g...@gmail.com> wrote:
>
> Can those who know tell me is this a real bug which should be reported
>
yeah I see the bug, but only on Firefox, and the bug goes away when
you load the previous version using v=3.1

the bug seems to be a caught exception, caused when the map window is
so small and it can't fit the streetviewcontrol man and zoomcontrol
onto the map.

After the error the zoomcontrol disappears altogether when you make
the map large again.

Also if you make the "small" map 400x400 instead of 200x200 then the
bug disappears.

...

Peter Lawless

unread,
Aug 17, 2010, 7:40:34 AM8/17/10
to google-map...@googlegroups.com
Thanks William

I just noticed the problem was Firefox only!

Will try some code to switch the control types rather than relying of default behaviour and see if the problem goes away.

Pete


--
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.


Peter Lawless

unread,
Aug 17, 2010, 8:29:56 AM8/17/10
to google-map...@googlegroups.com
With the code changed to include 

             navigationControl: true,
             navigationControlOptions: {
   style: google.maps.NavigationControlStyle.SMALL
 },
     mapTypeControl: true,
     mapTypeControlOptions: {
           style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
          },
in the map options the problem with Firefox goes away when reducing to 200x200.  However when I attempt to dynamically switch the control types as part of the map resize routine it re-appears.  
Is there anyway to check when the resize event is complete so I can switch the control options on a map which is fully resized?
Thanks
Pete

William

unread,
Aug 17, 2010, 8:45:59 AM8/17/10
to Google Maps JavaScript API v3
On Aug 17, 10:29 pm, Peter Lawless <pjl.g...@gmail.com> wrote:
> Is there anyway to check when the resize event is complete so I can
> switch the control options on a map which is fully resized?

maybe an event listener for the "idle" event but the workaround is
getting complicated so might be best just to use version 3.1 until the
problem is fixed by Google.

google.maps.event.addListener(map, 'idle', function() {
if (big) {
...
}
});

...

Peter Lawless

unread,
Aug 17, 2010, 9:29:06 AM8/17/10
to google-map...@googlegroups.com
I have not specifically reported the 'bug' to Google should I do so?

Pete


--

William

unread,
Aug 17, 2010, 5:15:24 PM8/17/10
to Google Maps JavaScript API v3
On Aug 17, 11:29 pm, Peter Lawless <pjl.g...@gmail.com> wrote:
> I have not specifically reported the 'bug' to Google should I do so?
>
yeah it would be a good idea to report the bug with your example using
the issue tracker:

http://code.google.com/p/gmaps-api-issues/issues/entry?template=Maps+API+v3+-+Bug

,,,
Reply all
Reply to author
Forward
0 new messages