Open info window if user hovers longer than x milliseconds - google-maps

What I'm trying to do is very simple:
open the marker's info window only if the user has hovered on the marker for longer than x millisecond.
I can't find how to do this anywhere. I would appreciate a little code snippet to show me how to set this up!

The jQuery HoverIntent plugin might be able to help you
http://cherne.net/brian/resources/jquery.hoverIntent.html
hoverIntent is a plug-in that attempts to determine the user's intent... like a crystal ball, only with mouse movement! It works like (and was derived from) jQuery's built-in hover. However, instead of immediately calling the onMouseOver function, it waits until the user's mouse slows down enough before making the call.

Actually I finally found the solution to it on the Google Maps Group here: http://groups.google.com/group/google-maps-api/browse_thread/thread/73cf193d42a0bbfe/fa531a39b353d198?lnk=gst&q=open+hover#fa531a39b353d198
Best of luck to all the late night coders out there :)

Related

What is the use of VIDEOEXPOSE in pygame?

I dont really understand the utility of this event type. It seems to appear at the same time as the VIDEORESIZE event but it does not have any attribute like the QUIT event. The official documentation of pygame events does not talk about this one http://www.pygame.org/docs/ref/event.html... Does anyone know why this event type was created ?
From the pygame.display documentation:
Hardware displays that draw direct to the screen will get pygame.VIDEOEXPOSE events when portions of the window must be redrawn.

polymer on-hold event is far too short, is there a way to lengthen it?

I'm working on implementing a hold event in my web-app for holding a post to generate a dialog with a link to that post that can be copied and shared. It's doable, and it works, but the on-hold event seems to be only 200ms of holding, and that's far too short if you're slowly scrolling while reading and you suddenly end up with a dialog popping up because you didn't scroll fast enough to bypass the on-hold event. Does anyone know what script I'd need to change or where to look? I've googled as much as I care to over the last hour and people seem to be using on-tap more than on-hold and I've not found any documentation on changing hold length. I looked in polymer.js and found
...
var hold = {
// wait at least HOLD_DELAY ms between hold and pulse events
HOLD_DELAY: 200,
// pointer can move WIGGLE_THRESHOLD pixels before not counting as a hold
WIGGLE_THRESHOLD: 16,
....
and played around with that, did not reflect any change in using on-hold or on-holdpulse
Anything helps at this point.
Edit: I've now finished the on-hold functionality for my news posts for my web-app in a separate test file. Still just need to find out if I can lengthen the on-hold time so I can actually implement the new functionality.
I don't know why it didn't work before when I was editing HOLD_DELAY in polymer.js but while playing with it tonight at work, setting it to 1000 did affect the hold length for on-hold events in my script. Maybe I was too tired to realize I hadn't saved or something when I was playing with it at home. Either way, I have my solution now.

how to know when Map control was first manipulated?

I am using the Map control in Windows Phone 8.
I need to implement a page where user can select his location using the map control.
I am trying to know when the app was first manipulated by the user.
Some background info:
I saw that when the control is shown, it automatically centers the world map, and CenterChanged event is raised.
I am not able to understand how ManipulationStarted, ManipulationDelta and ManipulationCompleted work.
the first time I drag, ManipulationStarted is not called, only ManipulationCompleted.
I could consider the first manipulation by user as being the 2nd time the CenterChanged is fired.
But this is a hack or a guess, I am not happy not having a good understanding how it works.
The Map control intercepts and handles Manipulation events and as such you don't get all of them. Remember, once routed events are marked at e.Handled=true they no longer bubble up.
Depending on your Scenario WP8 exposes the UseOptimizedManipulationRouting property which might prove useful. Setting UseOptimizedManipulationRouting=false causes Map, Pivot and other controls to not swallow events for nested controls.
If that doesn't help, have a look at the following Nokia Wiki article where the author ran into the same problem as you did and used Touch.FrameReported to get out of it # http://www.developer.nokia.com/Community/Wiki/Real-time_rotation_of_the_Windows_Phone_8_Map_Control

ActionScript 3 scrolling issues

I'm trying to make a google maps style interface for a design project. I've got the drag/drop and zoom functions working, but I also want to make it react to gestures on a trackpad (macbook). I assumed 'listening' to the event.delta of a MouseEvent would do the trick, but somehow it's not working. So what's wrong with my code?
stage.addEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheelEvent);
function onMouseWheelEvent(event:MouseEvent):void {
tafelOrigineel_mc.y += event.delta;
}
I have loaded the flash MouseEvents earlier in the document, so that shouldn't be the problem. After I got this working, I will try to use it on the x-axis too. Is that possible with the MOUSE_WHEEL eventlistener?
Thx in advance
It is a long time problem regarding flash player on MacOS.
MOUSE_WHEEL event won't dispatch on MacOS. Though there are some workarounds involving the use of JavaScript to detect the use of the wheel (over the entire flash content), if it isn't a issue, try checking one of those.
There is a list in this blog post:
http://www.impossibilities.com/v4/2009/03/06/flash-mousewheel-implementations-for-mac-os-x/

Actionscript 3, flexSDK, Blocking mouse wheel scrolling when it's over flash stage

I searched for this a lot, but I couldn't find a solution for this 'bug' as it's called here:
http://fcontheweb.com/articles/scrollwheel/
Please, click on first flash, and use mouse wheel, then click on second flash and use mouse wheel again. Now You know perfectly what 'bug' I mean.
The thing is, I believe this bug can be solved WITHOUT externalinterface. This chat is made with AS 3:
http://www.kongregate.com/games/UnknownGuardian/game-development-room-gdr
Open 'codebox', hold ENTER to make a hundred of lines or so, and then test your mouse wheel.
It doesn't use any externalinterface technique (both obviously as it's Kongregate, and confirmed by author), just mx.component.textArea that itself implements the scrolling nicely.
I couldn't achieve that with even.preventDefault or stopPropagation. Any ideas?
E: Thank You, divillysausages! The question still isn't answered in 1% - what is textArea component's workaround?
There's two methods proposed here: http://gamedev.rasmuswriedtlarsen.com/2010/01/18/quicktip-scrolling-only-in-swf-not-on-page/, but only the first one works on Kongregate
Apparently it uses ByteArray and LocalConnection to construct an AS2 swf that stops most browsers getting the scroll event