ugg sorry just saw the detailed reply to your last post about this... so don't know what you're talking about must be referring to some particular rubber band control... I assume one built into the javascript api or something?
On Sep 21, 11:23 pm, Shaun <[email protected]> wrote: > By a rubber band control you mean you just want to draw a rectangle > border based on the "top left" and "bottom right"? If I understand > you correctly I think all you need is > thishttp://code.google.com/apis/maps/documentation/flash/reference.html#M... > the rest of it you can handle either in an overlay if it's desired to > leave the rubberbands on the map when zooming/panning, or by adding a > canvas around the map object then drawing on an object stacked on top > of the map, visually something like this > > //this is totally pseudo code it won't run... maybe haxe will run it > ha... written not compiled.. > <script> > function creationCompleteHandler():void > { > theCanvas.addEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown, > true); > theCanvas.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);} > > function handleMouseDown(event:MouseEvent):void > { > if(event.ctrlKey) > { > event.stopImmediatePropagation(); > crbd.downPointX = event.localX; > crbd.downPointY = event.localY;} > } > > function handleMouseUp(event:MouseEvent):void > { > crbd.upPointX= event.localX; > crbd.upPointY = event.localY;} > > </script> > > <mx:Canvas id="theCanvas"> > <maps:Map/> > <cust:CustomRubberBandDrawing id="crbd"/> > </mx:Canvas> > > then I suppose you'd want them to still be able to use the mouse to > navigate the map so maybe on the map itself put a click handler where > if the Ctrl key is held down or something of that nature then you can > add a listener to the canvas, and have set the userCapture property of > addEventListener to true, then you can stop the event I believe before > it gets to the map > (event.stopImmediatePropagation())http://livedocs.adobe.com/flex/3/html/help.html?content=events_05.html > > it says using capture can be computationally expensive but I think on > a mouse down or a mouse up it would probably be insignificant. > > http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl... > > eh well that's a lot of all over the place, let me know if any of this > seems to help or you want me try and clarify how I imagine this could > work. I assume here you'll be able to make a custom UI component that > accepts the local coordinates and invalidates display list then draws > the rectangle in update display list... if there's no need for visual > then all you need is the point to latlng conversion function. > > Thanks, > Shaun > > On Sep 21, 7:31 am, Ashutosh <[email protected]> wrote: > > > Hi, > > > How can we get the latlong bounds of selected area by using rubberband > > control in google flex map. If anyone have idea, plz help me out. > > > Thanks in advance. -- 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.
