Flávio,
Thank you for the bug report. Unfortunately, I was unable to reproduce
it using the program below:
If you could kindly send me a small program that illustrates the bug,
I'd be happy to fix the bug and apply it pronto to the Utility
Library.
==========================
<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://
www.adobe.com/2006/mxml" layout="absolute">
<mx:VBox borderStyle="solid"
paddingTop="100"
paddingBottom="10"
paddingLeft="200"
paddingRight="10">
<mx:Button id="fname" label="Button 1"/>
<mx:Button id="lname" label="Button 2"/>
<maps:Map xmlns:maps="com.google.maps.*" id="map"
mapevent_mapready="onMapReady(
event)"
width="500" height="500" key="your_api_key"/>
<mx:Script>
<![CDATA[
import com.google.maps.LatLng;
import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.MapType;
import com.google.maps.extras.rubberbandctrl.RubberBandCtrl;
private function onMapReady(event:Event):void {
this.map.setCenter(new LatLng(40.736072,-73.992062), 14,
MapType.NORMAL_MA
P_TYPE);
rbCtrl.enable (map);
}
private const rbCtrl:RubberBandCtrl = new RubberBandCtrl ();
]]>
</mx:Script>
</mx:VBox>
</mx:Application>
==========================
On Oct 20, 9:36 am, Flávio Carmo <[email protected]> wrote:
> Kevin,
>
> Its amazing. I got the source from the Utility Library and put on my
> project to work in 5 minutes (my DSL was slow... lol).
>
> But after a few tests, i got a problem: the RubberBand Shape was
> misplaced. After another few tests i found out that was because my
> <Map> was in a VBOX place 100px from Top and 200 from Left. Because of
> this, the shape was placed in the wrong place, but the zoom was
> working right.
>
> So, i took the liberty to add a few tweaks in your rubberbandCtrl.as
> to work. Not the best design, but worked fine for me. Here they are:
>
> private var _dLeft: uint; // Distance from left
> private var _dTop: uint; // Distance from top
>
> public function RubberBandCtrl (dLeft:uint,dTop:uint):void
> {
> _dLeft = dLeft; // Setting the interval variable
> _dTop = dTop; // Setting the interval variable
> }
>
> and
>
> private function initRubberBandOverlay ():void
> {
> rubberband.x = map.x + _dLeft; // Using the distance from left
> rubberband.y = map.y + _dTop; // Using the distance from top
> rubberband.visible = false;
> map.stage.addChild (rubberband);
> }
>
> So, for this work:
>
> rubber = new RubberBandCtrl(200,100); // 200px from
> left and 100px
> from top
> rubber.enable(map);
>
> So, i dont know if you have this problem, but for my app, this works.
> Hope that this help other with the same situation.
>
> Thanks again for the RubberBandCtrl.
>
> Regards,
>
> Flavio Carmo
>
> On Sep 30, 4:21 pm, Kevin Macdonald <[email protected]>
> wrote:
>
> > Glad to hear it's working for you.
>
> > You can check out RubberBandCtrl by issuing this command:
>
> > $ svn
> > checkouthttp://gmaps-utility-library-flash.googlecode.com/svn/trunk/src/com/g...
> > rubberbandctrl
>
> > The control consists of two files: RubberBandCtrl.as and
> > CrosshairCursor.as
>
> > The documentation explains how to use it, but if you need any help,
> > just let me know.
>
> > On Sep 30, 8:46 am, pclinx <[email protected]> wrote:
>
> > > This is working well, is the source code available?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---