Fixed
Status Update
Comments
pa...@gmail.com <pa...@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.
p....@gmail.com <p....@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.
ev...@gmail.com <ev...@gmail.com> #4
OK, we'll consider it.
Thanks!
Thanks!
eb...@gmail.com <eb...@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.
dr...@gmail.com <dr...@gmail.com> #6
Please include the following Events in the v3 API that were present in v2
- loaded
- moveend
- loaded
- moveend
tr...@gtempaccount.com <tr...@gtempaccount.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.
ka...@gmail.com <ka...@gmail.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 (
ma...@gmail.com <ma...@gmail.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
ma...@gmail.com <ma...@gmail.com> #10
Berry, I agree; this would be sufficient and would simplify the code.
Paul.
Paul.
cm...@googlemail.com <cm...@googlemail.com> #11
Ben / Pamela,
What is the status ? Anything on the horizon ?
Both Paul K & I have had to kludge something together. The pixel arithmetic is
nasty. Browser dependencies cannot be avoided. An OverlayView is required just to
obtain the the tile offsets. It is difficult to coexist with your other event handlers.
What is the status ? Anything on the horizon ?
Both Paul K & I have had to kludge something together. The pixel arithmetic is
nasty. Browser dependencies cannot be avoided. An OverlayView is required just to
obtain the the tile offsets. It is difficult to coexist with your other event handlers.
sa...@gmail.com <sa...@gmail.com> #12
We're rewriting our app for V3 for our new version launch. We make constant use of
the mousemove event, and it is pretty much the main reason we cannot bring the system
fully into the V3 API.
Does anyone have any idea of the timeframe for this (and other) events to be
implemented into the API?
Also, I can't help wondering: Why were they taken off in the first place?
the mousemove event, and it is pretty much the main reason we cannot bring the system
fully into the V3 API.
Does anyone have any idea of the timeframe for this (and other) events to be
implemented into the API?
Also, I can't help wondering: Why were they taken off in the first place?
ra...@gmail.com <ra...@gmail.com> #14
No need to get the offset from the browser and do pixel conversions, just draw a
transparent polygon over your map and use the mousemove listener on the polygon. Each
time the idle event occurs on the map, redraw your polygon. The only limitation is
that you can't zoom out beyond level 3 unless you add some functionality for drawing
polygons that span 180+ degrees (which wouldn't be too difficult).
=================================================
Code:
=================================================
var map = new google.maps.Map();
var mapPolygonOverlay = null;
google.maps.event.addListener(map, 'idle', function()
{
// Delete the previous mapPolygonOverlay if it exists
if (mapPolygonOverlay != null)
{
var mapPolygonOverlayVertices = mapPolygonOverlay.getPath();
// Remove all the points from the polygon
for (var i = mapPolygonOverlayVertices.length; i >= 0; i--)
{
mapPolygonOverlayVertices.removeAt(i);
}
}
// Draw a polygon that is the map bounds
var mapBounds = map.getBounds();
var NE = mapBounds.getNorthEast();
var SW = mapBounds.getSouthWest();
var NW = new google.maps.LatLng(SW.lat(), NE.lng());
var SE = new google.maps.LatLng(NE.lat(), SW.lng());
var mapPolygonOverlayPaths = [NE, NW, SW, SE];
mapPolygonOverlay = new google.maps.Polygon({
paths: mapPolygonOverlayPaths,
strokeColor: '#000000',
strokeOpacity: 0.0,
strokeWeight: 0,
fillColor: '#000000',
fillOpacity: 0.0
});
mapPolygonOverlay.setMap(map);
// Add mousemove listener to polygon
google.maps.event.addListener(mapPolygonOverlay, 'mousemove', function(event)
{
updateMouseLocation(event.latLng);
});
});
google.maps.event.addListener(map, 'zoom_changed', function()
{
if(map.getZoom() < 3)
map.setZoom(3);
});
transparent polygon over your map and use the mousemove listener on the polygon. Each
time the idle event occurs on the map, redraw your polygon. The only limitation is
that you can't zoom out beyond level 3 unless you add some functionality for drawing
polygons that span 180+ degrees (which wouldn't be too difficult).
=================================================
Code:
=================================================
var map = new google.maps.Map();
var mapPolygonOverlay = null;
google.maps.event.addListener(map, 'idle', function()
{
// Delete the previous mapPolygonOverlay if it exists
if (mapPolygonOverlay != null)
{
var mapPolygonOverlayVertices = mapPolygonOverlay.getPath();
// Remove all the points from the polygon
for (var i = mapPolygonOverlayVertices.length; i >= 0; i--)
{
mapPolygonOverlayVertices.removeAt(i);
}
}
// Draw a polygon that is the map bounds
var mapBounds = map.getBounds();
var NE = mapBounds.getNorthEast();
var SW = mapBounds.getSouthWest();
var NW = new google.maps.LatLng(SW.lat(), NE.lng());
var SE = new google.maps.LatLng(NE.lat(), SW.lng());
var mapPolygonOverlayPaths = [NE, NW, SW, SE];
mapPolygonOverlay = new google.maps.Polygon({
paths: mapPolygonOverlayPaths,
strokeColor: '#000000',
strokeOpacity: 0.0,
strokeWeight: 0,
fillColor: '#000000',
fillOpacity: 0.0
});
mapPolygonOverlay.setMap(map);
// Add mousemove listener to polygon
google.maps.event.addListener(mapPolygonOverlay, 'mousemove', function(event)
{
updateMouseLocation(event.latLng);
});
});
google.maps.event.addListener(map, 'zoom_changed', function()
{
if(map.getZoom() < 3)
map.setZoom(3);
});
da...@google.com <da...@google.com> #16
A am looking for a REAL mousemove event handler returning Lat/Lon coordinates, not
some pathetic kludge.
some pathetic kludge.
Description
In v2, it's possible to create a custom map type by implementing a custom
getTileUrl method of GTileLayer object.
I'm not suggesting for "duplicating" the way v2 works in v3, but I think v3
should have it's own feature to help developers create their own custom map
types.