PictureMarkerSymbol - can it be rotated or angle changed?

3225
2
04-08-2011 07:42 AM
CarmenDurham
Occasional Contributor II
All,

I have an application that will track the GPS location of a vehicle.  I would like to change the rotation/angle of an esri.symbol.PictureMarkerSymbol to match the direction of the vehicle.  I can't seem to find a way to alter the rotation of the symbol.  I can extract the direction with no problem, it is rotating a PictureMarkerSymbol that is the problem.

I didn't see a property for this, so I just want to make sure I am not missing anything.

Thanks,
Carmen
0 Kudos
2 Replies
KellyHutchins
Esri Frequent Contributor
Yes you can change the angle for a picture marker symbol. The PictureMarkerSymbol class inherits from MarkerSymbol which has a setAngle method. Here's a code snippet that shows how this works:
    
var infoSymbol = new esri.symbol.PictureMarkerSymbol("../images/info.png",30,30);
 infoSymbol.setAngle(45);
CarmenDurham
Occasional Contributor II
Kelly,

I could has sworn that I tried this once with no luck.  But based on your reply, I tried again and it worked fine.  So, thank you! 

Carmen
0 Kudos