It's quite simple. You just have to handle MapMouseEvent.CLICK Event.
For example:
Add event listener to your map in map ready routine:
private function onMapReady(event:Event):void
{
map.addEventListener(MapMouseEvent.MOUSE_MOVE,
mapMouseMoveHandler);
}
Then just implement that handler in your code, like this:
private function mapMouseMoveHandler(event:MapMouseEvent):void
{
var mousePos:LatLng = event.latLng; // this is your point of
origin
(where mouse click occured)
}
Read more about LatLng class here:
http://code.google.com/intl/pl-PL/apis/maps/documentation/flash/reference.html#LatLng
or about MapMouseEvent class:
http://code.google.com/intl/pl-PL/apis/maps/documentation/flash/reference.html#MapMouseEvent
Best regards,
Jakub
On 26 Gru, 16:42, Vadim Tikanov <[email protected]> wrote:
> Hello,
>
> I'm working on a flex application with the following use case:
>
> 1. User points his location on an embed google map.
> 2. Application receives latitude/longitude of the pointed location.
> 3. Application sends these coordinates to a 3rd party web service for
> places suggestions.
>
> While I got a solution for #3, I have no experience with google maps
> API to implement #1 and #2. However, this looks like something pretty
> basic. Any suggestions? Code example would help a lot.
>
> Thanks!
--
You received this message because you are subscribed to the Google Groups
"Google Maps API For Flash" 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-api-for-flash?hl=en.