Select to view content in your preferred language

Flex API 2.5 - Rotation bug

1833
2
12-20-2011 03:34 AM
DavidLees
New Contributor
The appears to be a bug in PictureMarkerSymbol.angle for version 2.5 of the Flex API.

In version 2.4, when applying a rotation to a picture, it is rotated around its center. In version 2.5 it appears to be rotating round round the top corner. Adjusting the offsets does not fix the problem, as it does not appear to be rotating round the offset point.

The attached images demonstrate the problem. Each point is a compsite marker with a simple diamond and the rorate picture marker. In flex2-4.png, the two markers are aligned, but in flex2-5.png the rotating picture has drifted off by an uncontrollable offset.

Until this is fixed, it looks like I'll have to stick with version 2.4.
0 Kudos
2 Replies
SarthakDatt
Frequent Contributor
David,

Thanks for reporting this. Yes, it appears to be a bug in the 2.5 version of the API. However, this only happens if you have an embedded asset as source of the PictureMarkerSymbol.

I am assuming that's what you are using in your application. As a workaround for now, you can try setting the source of PMS such that its references a URL. Something like:

 protected function application1_initializeHandler(event:FlexEvent):void
 {
     var pms:PictureMarkerSymbol = new PictureMarkerSymbol();
     pms.source = "assets/pushpin_blue.gif";
     pms.angle += 45;
    
     myGraphic.symbol = pms;   // will work even if PMS is part of a composite symbol
}


Hope that helps.
0 Kudos
by Anonymous User
Not applicable
Original User: earthmine

Hi,

I think there is another bug with this class. When you try to update its angle at a very high speed (like at every frame in a 60 frames per second application), the pictureMarkerSymbol just disappear.
Did you notice that too?
Thank you,

Alex
0 Kudos