As I said earlier, it is possible to drag the map even if the drag
starts in a floatPane object -- at least if you're using a Mac OS X or
Windows browsers. You have to be using a class like InfoBox that lets
you turn this capability on or off. (google.maps.InfoWindow always
turns the capability off -- it never passes mouse events on to the
map.) The only situation I've found where the InfoBox drag isn't
handled by the map is on iPhone (haven't tried Android).  Apples'
event handlers seems to be getting in the way somehow.

Gary

On Jan 21, 9:51 pm, Ben Appleton <[email protected]> wrote:
> Oh I'm sorry: we suppress drag events in the floatPane, as this is where we
> place the info window.On Fri, Jan 22, 2010 at 1:27 PM, Gary Little 
> <[email protected]> wrote:
> > I've tried calling preventDefault() for touchstart, touchend,
> > touchmove events thinking they would then be passed on to the map,
> > causing the map to pan. This doesn't work: the map window doesn't move
> > (good), but the map doesn't pan (bad).
>
> > Gary
>
> > On Jan 21, 3:11 pm, Ben Appleton <[email protected]> wrote:
> > > Hi Gary,
>
> > > Do you cancel the default behavior on the drag event in the floatPane?
> > >  eg. using the following function:
>
> > > function cancelDefault(e) {
> > >   e.returnValue = false;
> > >   e.preventDefault && e.preventDefault();
>
> > > }
>
> > > Cheers
> > > Ben
>
> > > On Fri, Jan 22, 2010 at 9:51 AM, Gary Little <[email protected]>
> > wrote:
>
> > > > I've got a problem relating to the iPhone I'm trying to solve. I've
> > > > written a class called InfoBox ( see
> > > >http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobo.
> > ..
> > > > ) which can be used to place a DIV box on the floatPane of a map.
>
> > > > I've put in code to (conditionally) allow mouse events originating in
> > > > the InfoBox to be passed on to the map -- this means that, for most
> > > > browsers, the map will pan when you drag even if the drag starts
> > > > inside the InfoBox.
>
> > > > Unfortunately, this technique does not work when using Safari on the
> > > > iPhone. Instead, when you drag, the whole browser window moves -- this
> > > > is the usual behaviour when you try to drag an iPhone browser window.
>
> > > > Does anyone know how to override this iPhone behavior so that the map
> > > > will pan instead? Map applications built with Apple's Map Kit do work
> > > > the way I want but, of course, they're not created using the
> > > > JavaScript API.
>
> > > > Gary
>
> > > > --
> > > > 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]<google-maps-js-api-v3%2B 
> > [email protected]>
> > .
> > > > For more options, visit this group athttp://
> > groups.google.com/group/google-maps-js-api-v3?hl=en.
>
> > --
> > 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]<google-maps-js-api-v3%2B 
> > [email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-maps-js-api-v3?hl=en.

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