# Rotate pointshape

**URL:** <https://community.thinkgeo.com/t/rotate-pointshape/396>\
**Category:** WinForms\
**Created:** [April 29, 2009, 7:21pm UTC](https://community.thinkgeo.com/t/rotate-pointshape/396 "2009-04-29T19:21:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alan1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/5e9695/32.png) [@Alan1](https://community.thinkgeo.com/u/Alan1)\
**Post date:** [April 29, 2009, 7:21pm UTC](https://community.thinkgeo.com/t/rotate-pointshape/396/1 "2009-04-29T19:21:15Z")

</div>

I&nbsp;have&nbsp;created&nbsp;an&nbsp;app&nbsp;that&nbsp;has&nbsp;vehicles&nbsp;drawn&nbsp;on&nbsp;the&nbsp;map&nbsp;and&nbsp;periodically&nbsp;I&nbsp;move&nbsp;the&nbsp;vehicles&nbsp;around&nbsp;according&nbsp;to&nbsp;updated&nbsp;lat/lon.

All&nbsp;works&nbsp;fine&nbsp;except&nbsp;I&nbsp;cannot&nbsp;figure&nbsp;out&nbsp;how&nbsp;to&nbsp;rotate&nbsp;the&nbsp;vehicle&nbsp;(pointShape&nbsp;in&nbsp;an&nbsp;InMemeoryFeature&nbsp;Layer)&nbsp;according&nbsp;to&nbsp;it's&nbsp;direction&nbsp;of&nbsp;travel.

Any&nbsp;sample&nbsp;code&nbsp;would&nbsp;help.

&nbsp;

Alan

---

<div class="post-metadata">

**Author:** ![Ben](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ben/32/25720_2.png) [@Ben](https://community.thinkgeo.com/u/Ben)\
**Post date:** [April 29, 2009, 10:27pm UTC](https://community.thinkgeo.com/t/rotate-pointshape/396/2 "2009-04-29T22:27:07Z")

</div>

Alan,

There&nbsp;is&nbsp;a&nbsp;property&nbsp;RotationAngle&nbsp;in&nbsp;PointStyle,&nbsp;you&nbsp;can&nbsp;rotate&nbsp;the&nbsp;point&nbsp;using&nbsp;that.&nbsp;Here&nbsp;is&nbsp;a&nbsp;demo&nbsp;for&nbsp;that,&nbsp;please&nbsp;have&nbsp;a&nbsp;look.

Thanks,

Ben

&nbsp;

[637-Demo.zip](https://community.thinkgeo.com/uploads/default/original/2X/5/5103eee016a7242ae073962d55d369f34d036093.zip) (10.9 KB)

---

<div class="post-metadata">

**Author:** ![Alan1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/5e9695/32.png) [@Alan1](https://community.thinkgeo.com/u/Alan1)\
**Post date:** [April 29, 2009, 10:51pm UTC](https://community.thinkgeo.com/t/rotate-pointshape/396/3 "2009-04-29T22:51:47Z")

</div>

That&nbsp;does&nbsp;work&nbsp;except&nbsp;that&nbsp;is&nbsp;rotates&nbsp;all&nbsp;features&nbsp;within&nbsp;the&nbsp;layer&nbsp;and&nbsp;I&nbsp;need&nbsp;to&nbsp;rotate&nbsp;each&nbsp;feature&nbsp;(PointShape)&nbsp;within&nbsp;the&nbsp;layer&nbsp;differently.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Using&nbsp;that&nbsp;method&nbsp;I&nbsp;will&nbsp;need&nbsp;to&nbsp;create&nbsp;a&nbsp;new&nbsp;layer&nbsp;for&nbsp;every&nbsp;vehicle&nbsp;plotted.&nbsp;I&nbsp;need&nbsp;to&nbsp;plot&nbsp;200+&nbsp;vehicles.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Alan

---

<div class="post-metadata">

**Author:** ![Alan1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/5e9695/32.png) [@Alan1](https://community.thinkgeo.com/u/Alan1)\
**Post date:** [April 30, 2009, 6:14am UTC](https://community.thinkgeo.com/t/rotate-pointshape/396/4 "2009-04-30T06:14:13Z")

</div>

Does&nbsp;this&nbsp;mean&nbsp;the&nbsp;Rotate(PointShape,Single)&nbsp;Method&nbsp;does&nbsp;not&nbsp;work&nbsp;or&nbsp;is&nbsp;not&nbsp;implemented?

---

<div class="post-metadata">

**Author:** ![Ben](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ben/32/25720_2.png) [@Ben](https://community.thinkgeo.com/u/Ben)\
**Post date:** [May 5, 2009, 9:57am UTC](https://community.thinkgeo.com/t/rotate-pointshape/396/5 "2009-05-05T09:57:33Z")

</div>

Alan,&nbsp;  
&nbsp;&nbsp;  
&nbsp;You&nbsp;can&nbsp;create&nbsp;your&nbsp;own&nbsp;RotatePointStyle&nbsp;by&nbsp;inheriting&nbsp;the&nbsp;existing&nbsp;PointStyle,&nbsp;in&nbsp;the&nbsp;protected&nbsp;DrawCore&nbsp;method,&nbsp;you&nbsp;can&nbsp;rotate&nbsp;and&nbsp;render&nbsp;each&nbsp;feature&nbsp;differently&nbsp;with&nbsp;your&nbsp;own&nbsp;logic.&nbsp;In&nbsp;this&nbsp;way&nbsp;you&nbsp;only&nbsp;need&nbsp;one&nbsp;layer&nbsp;and&nbsp;still&nbsp;you&nbsp;can&nbsp;rotate&nbsp;every&nbsp;point&nbsp;with&nbsp;different&nbsp;angle.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Ben

---

<div class="post-metadata">

**Author:** ![Alan1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/5e9695/32.png) [@Alan1](https://community.thinkgeo.com/u/Alan1)\
**Post date:** [May 6, 2009, 8:44am UTC](https://community.thinkgeo.com/t/rotate-pointshape/396/6 "2009-05-06T08:44:03Z")

</div>

At&nbsp;the&nbsp;risk&nbsp;of&nbsp;sounding&nbsp;lazy!&nbsp;Do&nbsp;you&nbsp;have&nbsp;sample&nbsp;code?

Thanks&nbsp;Alan

---

<div class="post-metadata">

**Author:** ![Ben](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ben/32/25720_2.png) [@Ben](https://community.thinkgeo.com/u/Ben)\
**Post date:** [May 8, 2009, 9:41am UTC](https://community.thinkgeo.com/t/rotate-pointshape/396/7 "2009-05-08T09:41:52Z")

</div>

Please&nbsp;have&nbsp;a&nbsp;look&nbsp;at&nbsp;a&nbsp;corresponding&nbsp;post&nbsp;here&nbsp;where&nbsp;you&nbsp;may&nbsp;be&nbsp;able&nbsp;to&nbsp;get&nbsp;some&nbsp;insights&nbsp;how&nbsp;to&nbsp;implement&nbsp;it.&nbsp;  
&nbsp;&nbsp;  
&nbsp;[gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/5698/afv/topic/afpgj/1/Default.aspx](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/5698/afv/topic/afpgj/1/Default.aspx)&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Ben
