Fixed
Status Update
Comments
aa...@gmail.com <aa...@gmail.com> #2
Can you track these events by assigning event listeners on the map container? For
example:
google.maps.event.addDomListener('map_canvas', 'mousemove', function(e) {
// code here
});
Granted, it'll take a bit more code on your end to determine whether the mouse is
within map container boundaries, but this seems like a feature you can add yourself.
example:
google.maps.event.addDomListener('map_canvas', 'mousemove', function(e) {
// code here
});
Granted, it'll take a bit more code on your end to determine whether the mouse is
within map container boundaries, but this seems like a feature you can add yourself.
ka...@gmail.com <ka...@gmail.com> #3
I have tried but my event handlers conflict with yours. The pixel arithmetic is
messy. It requires an additional OverlayView for the "fromPixelToLatLon" conversion.
You already have the same information for "click" & "dblclick" event handlers.
The browsers measure pixel offsets differently. Internet Explorer measures pixel
offsets relative to the parent DIV. Firefox measures pixel offsets relative to the
DIV containing the corresponding tile. An extra DIV is required in order to simplify
the Firefox arithmetic. Unfortunately, it covers your click layer which causes it to
fail.
messy. It requires an additional OverlayView for the "fromPixelToLatLon" conversion.
You already have the same information for "click" & "dblclick" event handlers.
The browsers measure pixel offsets differently. Internet Explorer measures pixel
offsets relative to the parent DIV. Firefox measures pixel offsets relative to the
DIV containing the corresponding tile. An extra DIV is required in order to simplify
the Firefox arithmetic. Unfortunately, it covers your click layer which causes it to
fail.
[Deleted User] <[Deleted User]> #4
OK, we'll consider it.
Thanks!
Thanks!
de...@gmail.com <de...@gmail.com> #5
The pixel arithmetic is not trivial. Browser differences must be accommodated.
Look at:
http://www.polyarc.us/polycluster/event.html
It is a lot of work just to track mouse coordinates. It is incompatable with your
event listeners.
Look at:
It is a lot of work just to track mouse coordinates. It is incompatable with your
event listeners.
de...@gmail.com <de...@gmail.com> #6
Please include the following Events in the v3 API that were present in v2
- loaded
- moveend
- loaded
- moveend
en...@google.com <en...@google.com> #7
@5
Have you tried using the 'idle' event? This should replicate the events you named.
Have you tried using the 'idle' event? This should replicate the events you named.
cs...@google.com <cs...@google.com> #8
Berry, I starred this request; I also implemented an event handler that seems not to
have some of the issues you listed in your post:
http://notebook.kulchenko.com/maps/gridmove . The pixel arithmetic is still not
trivial, but it seems like you and I would still need to do our own calculations as
it's unlikely that the API will report pixel coordinates we both need to support
canvas tiles.
Paul (http://notebook.kulchenko.com/maps/ )
have some of the issues you listed in your post:
trivial, but it seems like you and I would still need to do our own calculations as
it's unlikely that the API will report pixel coordinates we both need to support
canvas tiles.
Paul (
cs...@google.com <cs...@google.com> #9
Hi Paul,
Both you & I are doing way too much work for what was trivial with the old API. I
will be happy with a browser independent way to obtain "mousemove" Lat/Lon
coordinates without adding an OverlayView. Conversion back to pixels is easy. I am
trying to avoid extracting information directly from the DOM which might change.
Berry
Both you & I are doing way too much work for what was trivial with the old API. I
will be happy with a browser independent way to obtain "mousemove" Lat/Lon
coordinates without adding an OverlayView. Conversion back to pixels is easy. I am
trying to avoid extracting information directly from the DOM which might change.
Berry
[Deleted User] <[Deleted User]> #10
Berry, I agree; this would be sufficient and would simplify the code.
Paul.
Paul.
Description
I'm getting the below error <b><i>most of the times</i></b> on every attempt to drag the map, after displaying a dynamically constructed polygon.
Error : <em>"Uncaught TypeError: Cannot read property 'x' of undefined" </em>
To replicate my problem :
1. Disable the map's draggable attribute
2. Allow user to trace a shape on the map, use the coordinates to dynamically construct and show a polyline.
3. When the tracing is done, construct a polygon using the path set to the above polyline and remove the polyline
4. Enable the map's draggable attribute
5. Now try to drag the map
Error/Consequence : The above mentioned error is displayed on the browser console several times. The map is not draggable.
jsFiddle : <a rel="nofollow" href="
(If using this jsFiddle, click on "Start Drawing" and trace on the map to display the polyline followed by the polygon. Now try to drag the map)
On Android browser, the error points to line# 180 of my html file (irrespective of the html file length) (but I cant check what that line is)
On the iPad emulation of Chrome on desktop, the error points to the below line of a google maps API js file (whose name changes on every page load). The error line is :
<code>g("center");H.bh=cg("center");H.Gf=bg("latLngCenter");H.ph=bg("projectionBounds");H.Df=bg("projection");H.getLatLngBounds=md("k");H.Hm=bg("fixedPoint");function lx(a,b){this.min=a;this.max=b}function mx(a,b){return b<a.min?a.min:b>a.max?a.max:b};function nx(a){this.d=a}L(nx,P);nx[F].immutable_changed=function(){var a=this,b=a.get("immutable"),c=a.b;b!=c&&(Id(a.d,function(d){(c&&c[d])!==(b&&b[d])&&a.set(d,b&&b[d])}),a.b=b)};function ox(a,b,c){Bn(this,a);this.b=b;
Browser & OS used:
1) Android browser on Android phone/tablet
2) iPad emulation of Chrome browser on desktop (closest I could get to an iPad+Mac combination)
API version :
Latest google maps API version (3.exp)
Temporary fix :
Introducing a delay of 1500ms before performing step #4 above is helping eliminate the map freezing and the error in the console, but makes the appln feel slower than it truly is.
Thanks in advance.
*********************************************************
For developers viewing this issue: please click the 'star' icon to be
notified of future changes, and to let us know how many of you are
interested in seeing it resolved.
*********************************************************