FF4 getProjection().fromLatLngToDivPixel(LatLng) miscalculates after zoom?

214 views
Skip to first unread message

JohnSnowden

unread,
Mar 31, 2011, 4:29:20 PM3/31/11
to Google Maps JavaScript API v3
I'm working on a corporate site (so sorry, can't show the code as it's
all in dev servers behind firewall, etc. as we're pre-launch). I just
installed FF4 to make sure everything was running OK with my map that
we're about to deploy and found that it's not. Verified that FF3.6 is
handling this correctly, but FF4.0 is not. Chrome, IE, and Safari are
all golden with it.

I've got a map with a handful of markers, each with a custom InfoBox
(Gary Little's utility - http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/docs/reference.html),
and am using the markerClusterer library as well.

The infoBox opens when you mouseover a marker. It works on the
initial zoom level, but then I've verified that this line of code on
subsequent zoom changes is not returning the correct DivPixel location
based on the LatLng:
var pixPosition =
this.getProjection().fromLatLngToDivPixel(this.position_);

(This is from Gary's library in the InfoBox.prototype.draw function)

Since I can't post the code, I hardly anticipate that anyone can help
me much with it, but I wanted to mention it in case someone out there
has had a similar finding.

I have modified the infoBox library in order to pop the div out of the
floatPane - I had to make the infoBox a child of the body so that the
infoBox can go beyond the map div's box since in most cases the
infoBox is larger than the map. There's a good chance I've done
something that messed it up, especially since my attempt to duplicate
it in a simple map container that I could share with you did not
duplicate the problem. However, I continue to verify that FF4 is the
only culprit browser in this case, in all other cases that line of
code is returning the correct DivPixel location from the LatLng.

I suspect that something in FF4's program is not working with the map
to trigger an event like the other browsers are which allows the
projection to recalculate on zoom change. But honestly, projections
are a side of the Google Maps API that I'm far from expert in (yet).

John

JKurtock

unread,
Apr 11, 2011, 9:54:20 PM4/11/11
to Google Maps JavaScript API v3
I've discovered that Firefox 4 does not correctly handle dragging of
routes (which was handled well with FF3.6). It looks like FF4 is not
correctly firing click events on the map. Unfortunately, I don't get
this behavior on maps.google.com w/FF4.

It will take me another day to prepare a stripped application just to
show that behavior, and I will do that.

- Jeff

On Mar 31, 1:29 pm, JohnSnowden <johnsnow...@gmail.com> wrote:
> I'm working on a corporate site (so sorry, can't show the code as it's
> all in dev servers behind firewall, etc. as we're pre-launch).  I just
> installed FF4 to make sure everything was running OK with my map that
> we're about to deploy and found that it's not.  Verified that FF3.6 is
> handling this correctly, but FF4.0 is not.  Chrome, IE, and Safari are
> all golden with it.
>
> I've got a map with a handful of markers, each with a custom InfoBox
> (Gary Little's utility -http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobo...),
Reply all
Reply to author
Forward
0 new messages