The mousemove callback function is passed a MouseEvent object, check
out the documentation for MouseEvent:

http://code.google.com/apis/maps/documentation/javascript/reference.html#MouseEvent

So your code should be:

google.maps.event.addListener(map, 'mousemove', function(myEvent) {

  p = myEvent.latLng;

}

Martin.


On Mar 14, 9:54 am, ALD2355 <[email protected]> wrote:
> Can anybody help with a simple code issue.  I am trying to rewrite one of
> the maps in v3 and I cannot get a mouse event to work.  In v2:
>
>   GEvent.addListener(map, "mousemove", function(latlng)
>    {
>       p = latlng;
>
> In v3:
>
> google.maps.event.addListener(map, 'mousemove', function(latlng) {
>
>   p = latlng;
>
> It keeps telling me that there is no object in v3 so what should p be equal
> to?
>
> Are there any translators for one version to another since nothing seems to
> be backward compatible?
>
> Thanks

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to