It's an action in an event. So do it in two events: first request the location based on whatever condition you want (every few seconds, or on click, for example), then in another event, use that information for whatever purposes you want.
Here's an example. My geography sucks but I think this'll work for you...