ThinkGeo.com    |     Documentation    |     Premium Support

How to rotate a pointshape w/ a set Image

I currently have an InMemoryFeatureLayer who’s default point style is a .png. I then made a new PointShape and added it to the layer. This works fine, but now I’m trying to rotate it constantly (it will rotate to a designated heading).

I’ve tried the following:

pointShape.Rotate(pointShape.GetCenterPoint(), 90);

bitmapLayer.Open();
bitmapLayer.EditTools.BeginTransaction();
bitmapLayer.EditTools.Update(pointShape);
bitmapLayer.EditTools.CommitTransaction();
bitmapLayer.Close();

This has no effect on the image being rotated though. Any help would be great!

bitmapLayer is the layer where pointShape is held.

Thanks!

Hi Dan,

The point shape is a point, which don’t have the direction.

So what you need is rotate the point style.

You can set pointStyle.RotationAngle for it.

Please refer this post: PointStyle + RotationAngle?

Regards,

Ethan

Oh I see, thank you! Works fine now.

Hi Dan,

I am glad to hear that’s helpful.

Regards,

Ethan