# Another strange map rotation incident

**URL:** <https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661>\
**Category:** WinForms\
**Created:** [April 9, 2011, 9:56am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661 "2011-04-09T09:56:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [April 9, 2011, 9:56am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/1 "2011-04-09T09:56:29Z")

</div>

Good&nbsp;morning...

I&nbsp;know&nbsp;already&nbsp;that&nbsp;nobody's&nbsp;every&nbsp;seen&nbsp;this&nbsp;before,&nbsp;but&nbsp;I&nbsp;am&nbsp;having&nbsp;a&nbsp;map&nbsp;rotation&nbsp;issue&nbsp;that&nbsp;is&nbsp;driving&nbsp;me&nbsp;crazy.&nbsp;&nbsp;Depending&nbsp;on&nbsp;how&nbsp;I&nbsp;code&nbsp;my&nbsp;map&nbsp;rotation&nbsp;the&nbsp;contents&nbsp;of&nbsp;an&nbsp;InMemoryLayer&nbsp;gets&nbsp;out&nbsp;of&nbsp;sync&nbsp;with&nbsp;the&nbsp;contents&nbsp;of&nbsp;a&nbsp;SqlServer&nbsp;layer.&nbsp;&nbsp;How&nbsp;can&nbsp;this&nbsp;happen?&nbsp;

Here's&nbsp;what&nbsp;my&nbsp;map&nbsp;starts&nbsp;as&nbsp;(I&nbsp;am&nbsp;driving&nbsp;across&nbsp;one&nbsp;marking&nbsp;lot&nbsp;to&nbsp;a&nbsp;driveway&nbsp;and&nbsp;then&nbsp;across&nbsp;another&nbsp;parking&nbsp;lot)...

 ![](https://community.thinkgeo.com/uploads/default/original/1X/697bc417a83a368dedf6946f92ac1d1bfc7790e2.PNG)

...and&nbsp;as&nbsp;soon&nbsp;as&nbsp;I&nbsp;rotate&nbsp;the&nbsp;map&nbsp;the&nbsp;layers&nbsp;get&nbsp;out&nbsp;of&nbsp;sync...

 ![](https://community.thinkgeo.com/uploads/default/original/1X/562d0ff1ca32f879177530025f0c1da07f2d02bd.PNG)

Depending&nbsp;on&nbsp;how&nbsp;I&nbsp;code&nbsp;the&nbsp;rotation&nbsp;and&nbsp;CenterAt()&nbsp;call,&nbsp;this&nbsp;loss&nbsp;of&nbsp;layer&nbsp;sync&nbsp;happens&nbsp;after&nbsp;the&nbsp;first&nbsp;or&nbsp;second&nbsp;redraw.

In&nbsp;case&nbsp;it&nbsp;helps,&nbsp;this&nbsp;is&nbsp;what&nbsp;I'm&nbsp;trying&nbsp;to&nbsp;do:&nbsp;In&nbsp;this&nbsp;mode,&nbsp;the&nbsp;vehicle's&nbsp;direction&nbsp;of&nbsp;travel&nbsp;always&nbsp;points&nbsp;to&nbsp;the&nbsp;top&nbsp;of&nbsp;the&nbsp;map.&nbsp;&nbsp;To&nbsp;prevent&nbsp;a&nbsp;lot&nbsp;of&nbsp;map&nbsp;refreshing,&nbsp;when&nbsp;the&nbsp;vehicle's&nbsp;bearing&nbsp;has&nbsp;changed&nbsp;by&nbsp;a&nbsp;certain&nbsp;amount,&nbsp;I&nbsp;recenter&nbsp;the&nbsp;map&nbsp;at&nbsp;the&nbsp;most&nbsp;latest&nbsp;vehicle&nbsp;position&nbsp;and&nbsp;also&nbsp;rotate&nbsp;the&nbsp;map&nbsp;so&nbsp;that&nbsp;the&nbsp;vehicle's&nbsp;position&nbsp;is&nbsp;pointing&nbsp;at&nbsp;the&nbsp;top&nbsp;of&nbsp;the&nbsp;map&nbsp;again.&nbsp;&nbsp;But&nbsp;I&nbsp;have&nbsp;constantly&nbsp;struggled&nbsp;to&nbsp;get&nbsp;this&nbsp;to&nbsp;happen&nbsp;while&nbsp;the&nbsp;map&nbsp;is&nbsp;rotated.&nbsp;&nbsp;I&nbsp;can&nbsp;set&nbsp;the&nbsp;rotation&nbsp;to&nbsp;0,&nbsp;apply&nbsp;my&nbsp;changes,&nbsp;then&nbsp;rotate&nbsp;the&nbsp;map,&nbsp;but&nbsp;in&nbsp;order&nbsp;to&nbsp;get&nbsp;that&nbsp;to&nbsp;work&nbsp;I&nbsp;have&nbsp;to&nbsp;refresh&nbsp;the&nbsp;map&nbsp;after&nbsp;setting&nbsp;the&nbsp;rotation&nbsp;to&nbsp;0,&nbsp;which&nbsp;causes&nbsp;a&nbsp;double&nbsp;redraw&nbsp;that&nbsp;nobody&nbsp;likes.

I&nbsp;am&nbsp;still&nbsp;struggling&nbsp;with&nbsp;recentering&nbsp;the&nbsp;map&nbsp;and&nbsp;applying&nbsp;rotation&nbsp;in&nbsp;one&nbsp;step.&nbsp;&nbsp;If&nbsp;I&nbsp;do&nbsp;it&nbsp;one&nbsp;way,&nbsp;I&nbsp;get&nbsp;goofy&nbsp;stuff&nbsp;like&nbsp;you&nbsp;see&nbsp;above.&nbsp;&nbsp;If&nbsp;I&nbsp;do&nbsp;it&nbsp;another&nbsp;way,&nbsp;the&nbsp;map&nbsp;jumps&nbsp;all&nbsp;over&nbsp;the&nbsp;place.&nbsp;&nbsp;PLEASE!&nbsp;&nbsp;Do&nbsp;not&nbsp;direct&nbsp;me&nbsp;to&nbsp;the&nbsp;samples...I&nbsp;have&nbsp;been&nbsp;there&nbsp;many&nbsp;times&nbsp;before&nbsp;and&nbsp;the&nbsp;multi-layer&nbsp;complications&nbsp;I&nbsp;am&nbsp;seeing&nbsp;with&nbsp;this&nbsp;application,&nbsp;which&nbsp;has&nbsp;30&nbsp;or&nbsp;40&nbsp;layers,&nbsp;don't&nbsp;show&nbsp;up&nbsp;when&nbsp;you're&nbsp;just&nbsp;rotating&nbsp;one&nbsp;layer.&nbsp;&nbsp;AND,&nbsp;as&nbsp;I've&nbsp;said&nbsp;before,&nbsp;the&nbsp;example&nbsp;DOES&nbsp;NOT&nbsp;attempt&nbsp;to&nbsp;rotate&nbsp;the&nbsp;map&nbsp;and&nbsp;recenter&nbsp;it&nbsp;at&nbsp;the&nbsp;same&nbsp;time.&nbsp;

Thanks&nbsp;for&nbsp;any&nbsp;suggestions!

Allen

---

<div class="post-metadata">

**Author:** ![Robert](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@Robert](https://community.thinkgeo.com/u/Robert)\
**Post date:** [April 9, 2011, 10:10am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/2 "2011-04-09T10:10:24Z")

</div>

I&nbsp;am&nbsp;seeing&nbsp;the&nbsp;same&nbsp;problem,&nbsp;although&nbsp;I&nbsp;am&nbsp;doing&nbsp;both&nbsp;a&nbsp;move&nbsp;and&nbsp;a&nbsp;rotate&nbsp;at&nbsp;the&nbsp;same&nbsp;time.&nbsp;&nbsp;The&nbsp;InMemoryFeatureLayers&nbsp;get&nbsp;out&nbsp;of&nbsp;sync.&nbsp;&nbsp;If&nbsp;the&nbsp;direction&nbsp;of&nbsp;travel&nbsp;is&nbsp;North&nbsp;then&nbsp;everything&nbsp;sync’s&nbsp;back&nbsp;up.

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [April 11, 2011, 4:17am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/3 "2011-04-11T04:17:42Z")

</div>

&nbsp;

Hi&nbsp;Allen&nbsp;&&nbsp;Robert,

Currently&nbsp;we&nbsp;can't&nbsp;re-produce&nbsp;the&nbsp;issue&nbsp;you&nbsp;mentioned.&nbsp;But&nbsp;we&nbsp;provide&nbsp;a&nbsp;sample&nbsp;project&nbsp;to&nbsp;demonstrate&nbsp;how&nbsp;to&nbsp;rotate&nbsp;and&nbsp;center&nbsp;map&nbsp;at&nbsp;the&nbsp;same&nbsp;time.&nbsp;Please&nbsp;check&nbsp;the&nbsp;attachement&nbsp;"_ **RotateAndCenterMap** _"&nbsp;for&nbsp;more&nbsp;information&nbsp;(You&nbsp;can&nbsp;get&nbsp;the&nbsp;shape&nbsp;file&nbsp;"_ **Countries02.shp** _"&nbsp;from&nbsp;folder&nbsp;" **_HowDoISamples\SampleData\Data_**"&nbsp;along&nbsp;with&nbsp;DesktopEdition).

Please&nbsp;let&nbsp;us&nbsp;know&nbsp;if&nbsp;you&nbsp;have&nbsp;further&nbsp;questions.

Regards,

Ivan

&nbsp;

[RotateAndCenterMap.zip](https://community.thinkgeo.com/uploads/default/original/2X/c/c67f4016a7ac760c5c1374f54962a6f75a5c6fce.zip) (11.9 KB)

---

<div class="post-metadata">

**Author:** ![Robert](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@Robert](https://community.thinkgeo.com/u/Robert)\
**Post date:** [April 11, 2011, 4:43am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/4 "2011-04-11T04:43:37Z")

</div>

I’m&nbsp;trying&nbsp;to&nbsp;figure&nbsp;out&nbsp;what&nbsp;the&nbsp;CustomRotationProjection&nbsp;is&nbsp;trying&nbsp;to&nbsp;do&nbsp;with&nbsp;the&nbsp;pivotVertex&nbsp;property.&nbsp;&nbsp;What&nbsp;shape&nbsp;do&nbsp;I&nbsp;use&nbsp;for&nbsp;that?&nbsp;&nbsp;Just&nbsp;grab&nbsp;any&nbsp;shape&nbsp;and&nbsp;use&nbsp;the&nbsp;first&nbsp;line?&nbsp;(will&nbsp;this&nbsp;work&nbsp;with&nbsp;PolygonShape?)&nbsp;Or&nbsp;do&nbsp;I&nbsp;need&nbsp;to&nbsp;process&nbsp;every&nbsp;shape&nbsp;in&nbsp;the&nbsp;InMemoryLayer&nbsp;every&nbsp;time&nbsp;I&nbsp;move/rotate?&nbsp;I&nbsp;have&nbsp;6&nbsp;InMemoryFeatureLayers&nbsp;that&nbsp;have&nbsp;potentially&nbsp;100’s&nbsp;of&nbsp;shapes&nbsp;in&nbsp;each&nbsp;layer,&nbsp;will&nbsp;this&nbsp;be&nbsp;a&nbsp;performance&nbsp;hit?&nbsp;

---

<div class="post-metadata">

**Author:** ![Robert](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@Robert](https://community.thinkgeo.com/u/Robert)\
**Post date:** [April 11, 2011, 4:43am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/5 "2011-04-11T04:43:51Z")

</div>

I'm&nbsp;trying&nbsp;to&nbsp;figure&nbsp;out&nbsp;what&nbsp;the&nbsp;CustomRotationProjection&nbsp;is&nbsp;trying&nbsp;to&nbsp;do&nbsp;with&nbsp;the&nbsp;pivotVertex&nbsp;property.&nbsp;What&nbsp;shape&nbsp;do&nbsp;I&nbsp;use&nbsp;for&nbsp;that?&nbsp;Just&nbsp;grab&nbsp;any&nbsp;shape&nbsp;and&nbsp;use&nbsp;the&nbsp;first&nbsp;line?&nbsp;(will&nbsp;this&nbsp;work&nbsp;with&nbsp;PolygonShape?)&nbsp;Or&nbsp;do&nbsp;I&nbsp;need&nbsp;to&nbsp;process&nbsp;every&nbsp;shape&nbsp;in&nbsp;the&nbsp;InMemoryLayer&nbsp;every&nbsp;time&nbsp;I&nbsp;move/rotate?&nbsp;I&nbsp;have&nbsp;6&nbsp;InMemoryFeatureLayers&nbsp;that&nbsp;have&nbsp;potentially&nbsp;100's&nbsp;of&nbsp;shapes&nbsp;in&nbsp;each&nbsp;layer,&nbsp;will&nbsp;this&nbsp;be&nbsp;a&nbsp;performance&nbsp;hit?&nbsp;  
  
&nbsp;

BTW,&nbsp;your&nbsp;sample&nbsp;file&nbsp;doesn't&nbsp;compile.&nbsp;&nbsp;It's&nbsp;missing&nbsp;files&nbsp;in&nbsp;the&nbsp;Properties&nbsp;folder.

---

<div class="post-metadata">

**Author:** ![Val](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/e56c9b/32.png) [@Val](https://community.thinkgeo.com/u/Val)\
**Post date:** [April 11, 2011, 10:51am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/6 "2011-04-11T10:51:36Z")

</div>

Allen,

&nbsp;Looking&nbsp;at&nbsp;your&nbsp;screen&nbsp;shots,&nbsp;it&nbsp;seems&nbsp;to&nbsp;me&nbsp;that&nbsp;you&nbsp;are&nbsp;not&nbsp;setting&nbsp;the&nbsp;CustomRotationProjection&nbsp;to&nbsp;all&nbsp;the&nbsp;FeatureLayers&nbsp;of&nbsp;your&nbsp;map.&nbsp;Remember&nbsp;that&nbsp;you&nbsp;have&nbsp;to&nbsp;set&nbsp;the&nbsp;rotation&nbsp;projection&nbsp;to&nbsp;ALL&nbsp;the&nbsp;FeatureLayers&nbsp;on&nbsp;the&nbsp;map,&nbsp;otherwise&nbsp;you&nbsp;are&nbsp;going&nbsp;to&nbsp;have&nbsp;some&nbsp;unexpected&nbsp;behavior.&nbsp;The&nbsp;first&nbsp;thing&nbsp;I&nbsp;would&nbsp;do&nbsp;is&nbsp;to&nbsp;make&nbsp;sure&nbsp;of&nbsp;that.&nbsp;I&nbsp;think&nbsp;that&nbsp;you&nbsp;can&nbsp;run&nbsp;the&nbsp;code&nbsp;below&nbsp;which&nbsp;assign&nbsp;the&nbsp;CustomRotationProjection&nbsp;to&nbsp;all&nbsp;your&nbsp;FeatureLayers.&nbsp;Once&nbsp;we&nbsp;know&nbsp;that&nbsp;all&nbsp;the&nbsp;FeatureLayers&nbsp;have&nbsp;the&nbsp;rotation&nbsp;projection&nbsp;set,&nbsp;then&nbsp;the&nbsp;rotating&nbsp;and&nbsp;centering&nbsp;of&nbsp;the&nbsp;map&nbsp;should&nbsp;work&nbsp;as&nbsp;expected&nbsp;as&nbsp;you&nbsp;can&nbsp;see&nbsp;in&nbsp;this&nbsp;Code&nbsp;Community&nbsp;samples:

_Centering&nbsp;and&nbsp;Rotating&nbsp;_[wiki.thinkgeo.com/wiki/Map\_Suite\_De...d\_Rotating](http://wiki.thinkgeo.com/wiki/Map_Suite_Desktop_Edition_Vehicle_Tracking_Samples#Centering_and_Rotating)

&nbsp;If&nbsp;you&nbsp;are&nbsp;still&nbsp;seeing&nbsp;unexpected&nbsp;behavior,&nbsp;please&nbsp;send&nbsp;us&nbsp;a&nbsp;little&nbsp;self&nbsp;contained&nbsp;sample&nbsp;from&nbsp;you.&nbsp;Thank&nbsp;you.

&nbsp;

&nbsp;

&nbsp;

`foreach (Overlay overlay in winformsMap1.Overlays){    if (overlay is LayerOverlay)    {        LayerOverlay layerOverlay = (LayerOverlay)overlay;        foreach (Layer layer in layerOverlay.Layers)        {            if (layer is FeatureLayer)            {                FeatureLayer featureLayer = (FeatureLayer)layer;                featureLayer.FeatureSource.Projection = customRotationProjection;            }        }    }}`

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [April 11, 2011, 11:01am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/7 "2011-04-11T11:01:01Z")

</div>

Robert，&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;verified&nbsp;that&nbsp;the&nbsp;sample&nbsp;provided&nbsp;by&nbsp;Ivan&nbsp;can&nbsp;be&nbsp;compiled&nbsp;successfully,&nbsp;while&nbsp;if&nbsp;you&nbsp;want&nbsp;to&nbsp;run&nbsp;it,&nbsp;you&nbsp;probably&nbsp;need&nbsp;to&nbsp;copy&nbsp;the&nbsp;data&nbsp;(Countries02.shp&nbsp;etc&nbsp;5&nbsp;files)&nbsp;into&nbsp;the&nbsp;data&nbsp;folder.&nbsp;If&nbsp;you&nbsp;still&nbsp;cannot&nbsp;compile&nbsp;it,&nbsp;could&nbsp;you&nbsp;verify&nbsp;which&nbsp;version&nbsp;of&nbsp;Desktop&nbsp;Edition&nbsp;are&nbsp;you&nbsp;using&nbsp;against?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Any&nbsp;more&nbsp;questions&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Yale&nbsp;

---

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [April 12, 2011, 7:50am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/8 "2011-04-12T07:50:45Z")

</div>

Val,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;will&nbsp;blame&nbsp;this&nbsp;one&nbsp;on&nbsp;the&nbsp;programmer…me.&nbsp;&nbsp;I&nbsp;was&nbsp;doing&nbsp;essentially&nbsp;what&nbsp;you&nbsp;show&nbsp;in&nbsp;your&nbsp;code,&nbsp;but&nbsp;I&nbsp;had&nbsp;two&nbsp;chunks&nbsp;of&nbsp;code…one&nbsp;for&nbsp;the&nbsp;SQL&nbsp;Server&nbsp;layers&nbsp;and&nbsp;one&nbsp;for&nbsp;the&nbsp;InMemoryLayers&nbsp;(plus&nbsp;a&nbsp;“fall&nbsp;through”&nbsp;for&nbsp;the&nbsp;MapShapeLayers&nbsp;that&nbsp;did&nbsp;nothing)…it&nbsp;hadn’t&nbsp;occured&nbsp;to&nbsp;me&nbsp;at&nbsp;the&nbsp;time&nbsp;I&nbsp;wrote&nbsp;the&nbsp;code&nbsp;that&nbsp;SQL&nbsp;Server&nbsp;layers&nbsp;and&nbsp;InMemoryLayers&nbsp;are&nbsp;both&nbsp;derived&nbsp;from&nbsp;FeatureLayer&nbsp;and&nbsp;I&nbsp;could&nbsp;access&nbsp;the&nbsp;FeatureShape.Projection&nbsp;property&nbsp;with&nbsp;a&nbsp;single&nbsp;chunk&nbsp;of&nbsp;code.&nbsp;&nbsp;ANYHOW,&nbsp;in&nbsp;the&nbsp;one&nbsp;chunk&nbsp;I&nbsp;had&nbsp;the&nbsp;order&nbsp;of&nbsp;setting&nbsp;the&nbsp;RotationProjection’s&nbsp;angle&nbsp;at&nbsp;a&nbsp;different&nbsp;sequence.&nbsp;&nbsp;For&nbsp;some&nbsp;reason&nbsp;the&nbsp;previous&nbsp;testing&nbsp;of&nbsp;this&nbsp;code&nbsp;did&nbsp;not&nbsp;reveal&nbsp;this&nbsp;error.&nbsp;&nbsp;I&nbsp;will&nbsp;confess:&nbsp;when&nbsp;I&nbsp;screw&nbsp;up,&nbsp;it’s&nbsp;usually&nbsp;a&nbsp;dumb&nbsp;one.&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;continue&nbsp;to&nbsp;believe&nbsp;rotation&nbsp;in&nbsp;MapSuite&nbsp;is&nbsp;too&nbsp;low-level&nbsp;for&nbsp;the&nbsp;typical&nbsp;programmer&nbsp;and&nbsp;there&nbsp;should&nbsp;be&nbsp;a&nbsp;way&nbsp;of&nbsp;hiding&nbsp;a&nbsp;lot&nbsp;of&nbsp;these&nbsp;details&nbsp;unless&nbsp;they&nbsp;are&nbsp;needed.&nbsp;&nbsp;When&nbsp;I&nbsp;have&nbsp;a&nbsp;few&nbsp;minutes&nbsp;I&nbsp;intend&nbsp;to&nbsp;submit&nbsp;this&nbsp;to&nbsp;the&nbsp;enhancement&nbsp;suggestion&nbsp;site.&nbsp;&nbsp;What&nbsp;I&nbsp;would&nbsp;like&nbsp;to&nbsp;do&nbsp;is&nbsp;to&nbsp;tell&nbsp;the&nbsp;map&nbsp;to&nbsp;rotate&nbsp;to&nbsp;a&nbsp;certain&nbsp;angle…PERIOD…and&nbsp;any&nbsp;interactions&nbsp;I&nbsp;do&nbsp;with&nbsp;the&nbsp;map,&nbsp;such&nbsp;as&nbsp;clicking,&nbsp;adding,&nbsp;querying&nbsp;or&nbsp;removing&nbsp;features,&nbsp;etc.,&nbsp;are&nbsp;done&nbsp;via&nbsp;unrotated&nbsp;coordinates.&nbsp;&nbsp;In&nbsp;our&nbsp;application&nbsp;users&nbsp;sometimes&nbsp;add&nbsp;new&nbsp;features&nbsp;on&nbsp;the&nbsp;map,&nbsp;which&nbsp;can&nbsp;be&nbsp;rotated&nbsp;at&nbsp;the&nbsp;time,&nbsp;and&nbsp;I&nbsp;have&nbsp;to&nbsp;explicitly&nbsp;derotate&nbsp;the&nbsp;feature&nbsp;to&nbsp;add&nbsp;a&nbsp;record&nbsp;to&nbsp;the&nbsp;database.&nbsp;&nbsp;I&nbsp;don’t&nbsp;believe&nbsp;I&nbsp;should&nbsp;have&nbsp;to&nbsp;deal&nbsp;with&nbsp;stuff&nbsp;at&nbsp;this&nbsp;level&nbsp;unless&nbsp;I&nbsp;need&nbsp;to.&nbsp;&nbsp;Or&nbsp;they&nbsp;click&nbsp;on&nbsp;the&nbsp;map&nbsp;and&nbsp;I&nbsp;need&nbsp;to&nbsp;query&nbsp;the&nbsp;database&nbsp;with&nbsp;that&nbsp;position,&nbsp;but&nbsp;it&nbsp;needs&nbsp;to&nbsp;be&nbsp;derotated&nbsp;because&nbsp;the&nbsp;data&nbsp;in&nbsp;the&nbsp;database&nbsp;isn’t&nbsp;rotated,&nbsp;of&nbsp;course.&nbsp;&nbsp;To&nbsp;me,&nbsp;this&nbsp;adds&nbsp;code&nbsp;that&nbsp;I&nbsp;don’t&nbsp;think&nbsp;needs&nbsp;to&nbsp;be&nbsp;there.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Allen&nbsp;

---

<div class="post-metadata">

**Author:** ![Val](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/e56c9b/32.png) [@Val](https://community.thinkgeo.com/u/Val)\
**Post date:** [April 12, 2011, 10:13am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/9 "2011-04-12T10:13:54Z")

</div>

Allen,&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;I&nbsp;am&nbsp;glad&nbsp;I&nbsp;could&nbsp;point&nbsp;you&nbsp;out&nbsp;thru&nbsp;my&nbsp;code&nbsp;to&nbsp;the&nbsp;problem&nbsp;in&nbsp;your&nbsp;code&nbsp;that&nbsp;would&nbsp;cause&nbsp;the&nbsp;unexpected&nbsp;rotation&nbsp;behavior.&nbsp;But&nbsp;you&nbsp;have&nbsp;nothing&nbsp;to&nbsp;blame&nbsp;yourself&nbsp;about,&nbsp;I&nbsp;have&nbsp;to&nbsp;confess&nbsp;that&nbsp;the&nbsp;way&nbsp;we&nbsp;have&nbsp;our&nbsp;API&nbsp;for&nbsp;doing&nbsp;map&nbsp;rotation&nbsp;is&nbsp;too&nbsp;low&nbsp;level&nbsp;as&nbsp;you&nbsp;explain&nbsp;with&nbsp;clarity&nbsp;in&nbsp;the&nbsp;second&nbsp;paragraph&nbsp;of&nbsp;your&nbsp;last&nbsp;post.&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;I&nbsp;believe&nbsp;we&nbsp;have&nbsp;the&nbsp;API&nbsp;like&nbsp;that&nbsp;for&nbsp;map&nbsp;rotation&nbsp;is&nbsp;because&nbsp;Map&nbsp;Suite&nbsp;cannot&nbsp;accomplish&nbsp;rotation&nbsp;for&nbsp;the&nbsp;full&nbsp;map&nbsp;when&nbsp;Raster&nbsp;layers&nbsp;(Geotiff,&nbsp;Mr&nbsp;SID&nbsp;etc)&nbsp;are&nbsp;involved.&nbsp;Currently,&nbsp;the&nbsp;map&nbsp;rotation&nbsp;can&nbsp;be&nbsp;done&nbsp;only&nbsp;with&nbsp;vector&nbsp;layers&nbsp;and&nbsp;it&nbsp;would&nbsp;be&nbsp;misleading&nbsp;to&nbsp;have&nbsp;a&nbsp;simple&nbsp;API&nbsp;for&nbsp;map&nbsp;rotation&nbsp;when&nbsp;this&nbsp;is&nbsp;still&nbsp;limited&nbsp;for&nbsp;only&nbsp;some&nbsp;types&nbsp;of&nbsp;layers.&nbsp;  
&nbsp;&nbsp;I&nbsp;know&nbsp;that&nbsp;the&nbsp;development&nbsp;team&nbsp;has&nbsp;in&nbsp;plan&nbsp;to&nbsp;have&nbsp;map&nbsp;rotation&nbsp;working&nbsp;with&nbsp;raster&nbsp;layers&nbsp;also&nbsp;which&nbsp;would&nbsp;make&nbsp;it&nbsp;fully&nbsp;functional.&nbsp;We&nbsp;will&nbsp;then&nbsp;present&nbsp;to&nbsp;the&nbsp;developer&nbsp;an&nbsp;easy&nbsp;API&nbsp;at&nbsp;the&nbsp;map&nbsp;level&nbsp;for&nbsp;this.&nbsp;  
&nbsp;&nbsp;Thank&nbsp;you&nbsp;for&nbsp;reminding&nbsp;us&nbsp;of&nbsp;this&nbsp;current&nbsp;limitation&nbsp;of&nbsp;Map&nbsp;Suite.

---

<div class="post-metadata">

**Author:** ![Val](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/e56c9b/32.png) [@Val](https://community.thinkgeo.com/u/Val)\
**Post date:** [April 12, 2011, 10:29am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/10 "2011-04-12T10:29:16Z")

</div>

Allen,

&nbsp;And&nbsp;make&nbsp;sure&nbsp;that&nbsp;this&nbsp;issue&nbsp;is&nbsp;in&nbsp;the&nbsp;Enhancement&nbsp;Tracker&nbsp;&nbsp;so&nbsp;that&nbsp;it&nbsp;gets&nbsp;high&nbsp;priority&nbsp;for&nbsp;the&nbsp;development&nbsp;team&nbsp;to&nbsp;work&nbsp;on&nbsp;:-)

[helpdesk.thinkgeo.com/EnhancementTracker](http://helpdesk.thinkgeo.com/EnhancementTracker)

---

<div class="post-metadata">

**Author:** ![Robert](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@Robert](https://community.thinkgeo.com/u/Robert)\
**Post date:** [April 12, 2011, 10:38am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/11 "2011-04-12T10:38:16Z")

</div>

I&nbsp;hate&nbsp;repeating&nbsp;myself,&nbsp;but&nbsp;I&nbsp;could&nbsp;really&nbsp;use&nbsp;answers&nbsp;to&nbsp;the&nbsp;following:&nbsp;  
&nbsp;&nbsp;  
&nbsp;I’m&nbsp;trying&nbsp;to&nbsp;figure&nbsp;out&nbsp;what&nbsp;the&nbsp;CustomRotationProjection&nbsp;is&nbsp;trying&nbsp;to&nbsp;do&nbsp;with&nbsp;the&nbsp;pivotVertex&nbsp;property.&nbsp;What&nbsp;shape&nbsp;do&nbsp;I&nbsp;use&nbsp;for&nbsp;that?&nbsp;Just&nbsp;grab&nbsp;any&nbsp;shape&nbsp;and&nbsp;use&nbsp;the&nbsp;first&nbsp;line?&nbsp;(will&nbsp;this&nbsp;work&nbsp;with&nbsp;PolygonShape?)&nbsp;Or&nbsp;do&nbsp;I&nbsp;need&nbsp;to&nbsp;process&nbsp;every&nbsp;shape&nbsp;in&nbsp;the&nbsp;InMemoryLayer&nbsp;every&nbsp;time&nbsp;I&nbsp;move/rotate?&nbsp;I&nbsp;have&nbsp;6&nbsp;InMemoryFeatureLayers&nbsp;that&nbsp;have&nbsp;potentially&nbsp;100’s&nbsp;of&nbsp;shapes&nbsp;in&nbsp;each&nbsp;layer,&nbsp;will&nbsp;this&nbsp;be&nbsp;a&nbsp;performance&nbsp;hit?&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanx,&nbsp;  
&nbsp;Rob

---

<div class="post-metadata">

**Author:** ![Val](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/e56c9b/32.png) [@Val](https://community.thinkgeo.com/u/Val)\
**Post date:** [April 12, 2011, 11:19am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/12 "2011-04-12T11:19:36Z")

</div>

Robert,

&nbsp;Sorry&nbsp;I&nbsp;forgot&nbsp;your&nbsp;post&nbsp;after&nbsp;answering&nbsp;to&nbsp;Allen's&nbsp;question.

I&nbsp;supposed&nbsp;that&nbsp;you&nbsp;are&nbsp;referring&nbsp;to&nbsp;the&nbsp;property&nbsp;PivotVertex&nbsp;of&nbsp;the&nbsp;class&nbsp;CustomRotationProjection&nbsp;in&nbsp;the&nbsp;Code&nbsp;Community&nbsp;sample&nbsp;_Custom&nbsp;Rotation&nbsp;Projection&nbsp;_[wiki.thinkgeo.com/wiki/Map\_Suite\_De...Projection](http://wiki.thinkgeo.com/wiki/Map_Suite_Desktop_Edition_Projection_Samples#Custom_Rotation_Projection)

&nbsp;You&nbsp;have&nbsp;to&nbsp;be&nbsp;aware&nbsp;that&nbsp;this&nbsp;class&nbsp;CustomRotationProjection&nbsp;is&nbsp;used&nbsp;for&nbsp;the&nbsp;specific&nbsp;case&nbsp;where&nbsp;you&nbsp;have&nbsp;a&nbsp;shape&nbsp;that&nbsp;you&nbsp;want&nbsp;to&nbsp;rotate&nbsp;while&nbsp;the&nbsp;map&nbsp;in&nbsp;general&nbsp;stays&nbsp;unrotated&nbsp;as&nbsp;you&nbsp;can&nbsp;see&nbsp;in&nbsp;the&nbsp;example&nbsp;of&nbsp;the&nbsp;sample.&nbsp;This&nbsp;scenario&nbsp;might&nbsp;arise&nbsp;when&nbsp;you&nbsp;get&nbsp;a&nbsp;shape&nbsp;from&nbsp;an&nbsp;external&nbsp;source&nbsp;such&nbsp;as&nbsp;a&nbsp;CAD&nbsp;and&nbsp;it&nbsp;is&nbsp;not&nbsp;in&nbsp;the&nbsp;same&nbsp;angle&nbsp;as&nbsp;the&nbsp;map&nbsp;and&nbsp;you&nbsp;want&nbsp;o&nbsp;apply&nbsp;some&nbsp;rotation&nbsp;specifically&nbsp;to&nbsp;that&nbsp;layer&nbsp;to&nbsp;match&nbsp;the&nbsp;map.&nbsp;We&nbsp;apply&nbsp;rotation&nbsp;to&nbsp;it&nbsp;based&nbsp;on&nbsp;the&nbsp;pivot&nbsp;being&nbsp;the&nbsp;center&nbsp;of&nbsp;the&nbsp;shape&nbsp;but&nbsp;the&nbsp;pivot&nbsp;could&nbsp;be&nbsp;at&nbsp;any&nbsp;other&nbsp;location&nbsp;based&nbsp;on&nbsp;your&nbsp;needs.&nbsp;I&nbsp;stress&nbsp;that&nbsp;this&nbsp;operation&nbsp;has&nbsp;nothing&nbsp;to&nbsp;do&nbsp;with&nbsp;wanting&nbsp;to&nbsp;rotate&nbsp;the&nbsp;map&nbsp;as&nbsp;a&nbsp;whole,&nbsp;Map&nbsp;Rotation.

&nbsp;If&nbsp;you&nbsp;want&nbsp;to&nbsp;apply&nbsp;Map&nbsp;Rotation&nbsp;to&nbsp;your&nbsp;entire&nbsp;map&nbsp;which&nbsp;the&nbsp;case&nbsp;similar&nbsp;to&nbsp;Allen,&nbsp;you&nbsp;need&nbsp;a&nbsp;different&nbsp;class, **&nbsp;RotationProjection&nbsp;** which&nbsp;does&nbsp;not&nbsp;have&nbsp;a&nbsp;PivotVertex&nbsp;property.&nbsp;You&nbsp;can&nbsp;look&nbsp;at&nbsp;the&nbsp;Code&nbsp;Community&nbsp;sample&nbsp;_Centering&nbsp;and&nbsp;Rotating&nbsp;_[wiki.thinkgeo.com/wiki/Map\_Suite\_De...d\_Rotating](http://wiki.thinkgeo.com/wiki/Map_Suite_Desktop_Edition_Vehicle_Tracking_Samples#Centering_and_Rotating)&nbsp;to&nbsp;see&nbsp;how&nbsp;to&nbsp;use&nbsp;this&nbsp;class.

&nbsp;&nbsp;From&nbsp;reading&nbsp;your&nbsp;posts,&nbsp;I&nbsp;am&nbsp;assuming&nbsp;that&nbsp;what&nbsp;you&nbsp;want&nbsp;is&nbsp;to&nbsp;do&nbsp;Map&nbsp;Rotation&nbsp;like&nbsp;Allen.&nbsp;In&nbsp;this&nbsp;case,&nbsp;DO&nbsp;NOT&nbsp;use&nbsp;CustomRotationProjection&nbsp;class&nbsp;that&nbsp;you&nbsp;find&nbsp;in&nbsp;_Custom&nbsp;Rotation&nbsp;Projection&nbsp;_sample.&nbsp;This&nbsp;is&nbsp;for&nbsp;a&nbsp;different&nbsp;purpose.

&nbsp;I&nbsp;hope&nbsp;I&nbsp;cleared&nbsp;out&nbsp;some&nbsp;confusion&nbsp;that&nbsp;might&nbsp;have&nbsp;occured.

---

<div class="post-metadata">

**Author:** ![Robert](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@Robert](https://community.thinkgeo.com/u/Robert)\
**Post date:** [April 12, 2011, 11:27am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/13 "2011-04-12T11:27:32Z")

</div>

Well&nbsp;if&nbsp;that&nbsp;is&nbsp;the&nbsp;case,&nbsp;then&nbsp;the&nbsp;original&nbsp;problem&nbsp;stands.&nbsp;&nbsp;I&nbsp;have&nbsp;all&nbsp;layers&nbsp;projection&nbsp;property&nbsp;set&nbsp;to&nbsp;the&nbsp;same&nbsp;rotationProjection,&nbsp;yet,&nbsp;as&nbsp;the&nbsp;I&nbsp;drive&nbsp;around&nbsp;and&nbsp;the&nbsp;map&nbsp;rotates,&nbsp;the&nbsp;InMemoryLayers&nbsp;get&nbsp;out&nbsp;of&nbsp;sync&nbsp;with&nbsp;the&nbsp;Shape&nbsp;Layers.

---

<div class="post-metadata">

**Author:** ![Val](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/e56c9b/32.png) [@Val](https://community.thinkgeo.com/u/Val)\
**Post date:** [April 12, 2011, 4:22pm UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/14 "2011-04-12T16:22:36Z")

</div>

Robert,

&nbsp;From&nbsp;what&nbsp;you&nbsp;are&nbsp;describing,&nbsp;it&nbsp;leads&nbsp;me&nbsp;to&nbsp;believe&nbsp;that&nbsp;the&nbsp;InMemoryFeatureLayers&nbsp;that&nbsp;get&nbsp;out&nbsp;of&nbsp;sync&nbsp;do&nbsp;not&nbsp;have&nbsp;their&nbsp;Projection&nbsp;property&nbsp;set&nbsp;to&nbsp;RotationProjection.&nbsp;This&nbsp;is&nbsp;basically&nbsp;the&nbsp;same&nbsp;case&nbsp;as&nbsp;Allen's.

&nbsp;I&nbsp;recommend&nbsp;that&nbsp;you&nbsp;run&nbsp;the&nbsp;code&nbsp;I&nbsp;posted&nbsp;for&nbsp;Allen&nbsp;that&nbsp;makes&nbsp;sure&nbsp;all&nbsp;the&nbsp;layers&nbsp;have&nbsp;the&nbsp;RotationProjection&nbsp;set&nbsp;correctly.&nbsp;You&nbsp;can&nbsp;find&nbsp;it&nbsp;in&nbsp;the&nbsp;Post&nbsp;of&nbsp;04-11-2011&nbsp;11:51&nbsp;AM&nbsp;of&nbsp;this&nbsp;thread.

&nbsp;If&nbsp;the&nbsp;problem&nbsp;persists,&nbsp;we&nbsp;will&nbsp;need&nbsp;a&nbsp;small&nbsp;self&nbsp;contained&nbsp;sample&nbsp;app&nbsp;from&nbsp;you&nbsp;to&nbsp;investigate&nbsp;the&nbsp;problem.&nbsp;Thank&nbsp;you.

---

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [April 13, 2011, 8:30am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/15 "2011-04-13T08:30:27Z")

</div>

Val,&nbsp;Robert,&nbsp;etc.&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;was&nbsp;a&nbsp;bit&nbsp;confused&nbsp;by&nbsp;the&nbsp;purpose&nbsp;of&nbsp;the&nbsp;CustomRotationProjection&nbsp;myself.&nbsp;&nbsp;When&nbsp;I&nbsp;need&nbsp;to&nbsp;rotate&nbsp;or&nbsp;unrotate&nbsp;a&nbsp;feature,&nbsp;I’m&nbsp;calling&nbsp;the&nbsp;ConvertToInternalProjection&nbsp;or&nbsp;ConvertToExternalProjection&nbsp;methods&nbsp;of&nbsp;one&nbsp;of&nbsp;the&nbsp;ProjectionRotations&nbsp;assigned&nbsp;to&nbsp;a&nbsp;layer,&nbsp;as&nbsp;I&nbsp;was&nbsp;advised&nbsp;to&nbsp;do&nbsp;some&nbsp;time&nbsp;before.&nbsp;&nbsp;I’m&nbsp;guessing&nbsp;its&nbsp;purpose&nbsp;is&nbsp;to&nbsp;demonstrate&nbsp;some&nbsp;more&nbsp;advanced&nbsp;techniques.&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Robert…are&nbsp;you&nbsp;using&nbsp;InMemoryFeatureLayers&nbsp;or&nbsp;MapShapeLayers?&nbsp;&nbsp;I&nbsp;really&nbsp;like&nbsp;MapShapeLayers&nbsp;because&nbsp;we&nbsp;had&nbsp;some&nbsp;layers&nbsp;with&nbsp;complex&nbsp;styling&nbsp;that&nbsp;was&nbsp;difficult&nbsp;to&nbsp;do&nbsp;with&nbsp;a&nbsp;ValueStyle&nbsp;and&nbsp;initially&nbsp;had&nbsp;a&nbsp;lot&nbsp;of&nbsp;them&nbsp;in&nbsp;our&nbsp;application,&nbsp;but&nbsp;I&nbsp;have&nbsp;dropped&nbsp;almost&nbsp;all&nbsp;use&nbsp;of&nbsp;them&nbsp;because&nbsp;they&nbsp;don’t&nbsp;rotate;&nbsp;I&nbsp;had&nbsp;to&nbsp;call&nbsp;methods&nbsp;to&nbsp;rotate&nbsp;the&nbsp;shapes&nbsp;and&nbsp;reload&nbsp;the&nbsp;layer&nbsp;in&nbsp;code&nbsp;whenever&nbsp;the&nbsp;map&nbsp;rotates.&nbsp;&nbsp;More&nbsp;convoluted&nbsp;code&nbsp;to&nbsp;rotate&nbsp;a&nbsp;map!&nbsp;&nbsp;I&nbsp;am&nbsp;also&nbsp;curious&nbsp;if&nbsp;you’re&nbsp;using&nbsp;a&nbsp;SINGLE&nbsp;RotationProjection&nbsp;object&nbsp;and&nbsp;assigning&nbsp;it&nbsp;to&nbsp;all&nbsp;of&nbsp;your&nbsp;layers.&nbsp;&nbsp;If&nbsp;you&nbsp;look&nbsp;back&nbsp;in&nbsp;the&nbsp;forum&nbsp;you’ll&nbsp;find&nbsp;this&nbsp;has&nbsp;the&nbsp;potential&nbsp;for&nbsp;trouble&nbsp;if&nbsp;you&nbsp;start&nbsp;to&nbsp;use&nbsp;the&nbsp;RotationProjection&nbsp;methods&nbsp;since&nbsp;internally&nbsp;it&nbsp;opens&nbsp;and&nbsp;closes&nbsp;things…I&nbsp;was&nbsp;getting&nbsp;errors&nbsp;and&nbsp;the&nbsp;ultimate&nbsp;solution&nbsp;is&nbsp;to&nbsp;have&nbsp;a&nbsp;unique&nbsp;RotationProjection&nbsp;for&nbsp;each&nbsp;layer.&nbsp;&nbsp;Val’s&nbsp;snipped&nbsp;above&nbsp;doesn’t&nbsp;show&nbsp;it,&nbsp;but&nbsp;in&nbsp;my&nbsp;code&nbsp;once&nbsp;I&nbsp;have&nbsp;all&nbsp;of&nbsp;the&nbsp;layers&nbsp;loaded&nbsp;I&nbsp;am&nbsp;creating&nbsp;a&nbsp;NEW&nbsp;rotationProjection&nbsp;for&nbsp;EACH&nbsp;LAYER,&nbsp;and&nbsp;then&nbsp;setting&nbsp;RotationProjection.Angle&nbsp;while&nbsp;iterating&nbsp;through&nbsp;all&nbsp;of&nbsp;the&nbsp;layers,&nbsp;much&nbsp;like&nbsp;what&nbsp;Val’s&nbsp;snippet&nbsp;shows,&nbsp;although&nbsp;I’m&nbsp;not&nbsp;using&nbsp;the&nbsp;CustomRotationProjection.&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;am&nbsp;very&nbsp;pleased&nbsp;to&nbsp;see&nbsp;someone&nbsp;at&nbsp;ThinkGeo&nbsp;finally&nbsp;admit&nbsp;that&nbsp;the&nbsp;way&nbsp;programmers&nbsp;have&nbsp;to&nbsp;implement&nbsp;this&nbsp;stuff&nbsp;is&nbsp;tedious.&nbsp;&nbsp;Val&nbsp;has&nbsp;urged&nbsp;me&nbsp;to&nbsp;add&nbsp;this&nbsp;to&nbsp;the&nbsp;enhancement&nbsp;tracker,&nbsp;and&nbsp;after&nbsp;all&nbsp;this&nbsp;frustration&nbsp;I&nbsp;certainly&nbsp;will.&nbsp;&nbsp;I&nbsp;recently&nbsp;submitted&nbsp;an&nbsp;item&nbsp;to&nbsp;the&nbsp;enhancement&nbsp;tracker&nbsp;to&nbsp;beef&nbsp;up&nbsp;MapShapeLayers&nbsp;so&nbsp;that&nbsp;they&nbsp;have&nbsp;a&nbsp;FeatureSource&nbsp;and&nbsp;can&nbsp;be&nbsp;rotated&nbsp;along&nbsp;with&nbsp;the&nbsp;rest&nbsp;of&nbsp;the&nbsp;map.&nbsp;&nbsp;I&nbsp;have&nbsp;been&nbsp;exchanging&nbsp;some&nbsp;e-mails&nbsp;with&nbsp;Ryan&nbsp;over&nbsp;the&nbsp;MapShapeLayer&nbsp;enhancement&nbsp;and&nbsp;mentioned&nbsp;to&nbsp;him&nbsp;that&nbsp;we&nbsp;were&nbsp;using&nbsp;a&nbsp;competitor’s&nbsp;map&nbsp;component&nbsp;and&nbsp;rotation&nbsp;is&nbsp;just&nbsp;as&nbsp;low-level.&nbsp;&nbsp;If&nbsp;ThinkGeo&nbsp;could&nbsp;make&nbsp;this&nbsp;more&nbsp;programmer&nbsp;friendly&nbsp;it&nbsp;would&nbsp;be&nbsp;a&nbsp;leg&nbsp;up&nbsp;on&nbsp;the&nbsp;“other”&nbsp;component.&nbsp;&nbsp;My&nbsp;proposal&nbsp;to&nbsp;him&nbsp;(and&nbsp;this&nbsp;will&nbsp;be&nbsp;what&nbsp;I&nbsp;submit&nbsp;to&nbsp;the&nbsp;enhancement&nbsp;tracker)&nbsp;is&nbsp;that&nbsp;the&nbsp;programmer&nbsp;should&nbsp;just&nbsp;tell&nbsp;the&nbsp;map&nbsp;the&nbsp;angle&nbsp;of&nbsp;rotation,&nbsp;and&nbsp;any&nbsp;coordinate&nbsp;positions&nbsp;I&nbsp;tell&nbsp;the&nbsp;map&nbsp;are&nbsp;in&nbsp;unrotated&nbsp;coordinates&nbsp;and&nbsp;the&nbsp;map&nbsp;code&nbsp;can&nbsp;rotate&nbsp;whatever&nbsp;it&nbsp;needs.&nbsp;&nbsp;Likewise,&nbsp;if&nbsp;I&nbsp;click&nbsp;on&nbsp;a&nbsp;rotated&nbsp;map&nbsp;and&nbsp;it&nbsp;returns&nbsp;to&nbsp;me&nbsp;the&nbsp;map&nbsp;click&nbsp;point&nbsp;or&nbsp;a&nbsp;feature&nbsp;in&nbsp;unrotated&nbsp;coordinates.&nbsp;&nbsp;The&nbsp;map&nbsp;knows&nbsp;it&nbsp;is&nbsp;rotated&nbsp;and&nbsp;should&nbsp;be&nbsp;dealing&nbsp;with&nbsp;all&nbsp;of&nbsp;this&nbsp;stuff.&nbsp;&nbsp;Of&nbsp;course&nbsp;I&nbsp;can&nbsp;understand&nbsp;the&nbsp;reasoning&nbsp;for&nbsp;doing&nbsp;this,&nbsp;as&nbsp;Val&nbsp;explained.&nbsp;&nbsp;Our&nbsp;application’s&nbsp;map&nbsp;has&nbsp;the&nbsp;potential&nbsp;to&nbsp;be&nbsp;constantly&nbsp;rotated&nbsp;(and&nbsp;it&nbsp;sounds&nbsp;like&nbsp;Robert&nbsp;might&nbsp;be&nbsp;in&nbsp;a&nbsp;similar&nbsp;situation)&nbsp;so&nbsp;I&nbsp;NEVER&nbsp;have&nbsp;data&nbsp;in&nbsp;rotated&nbsp;coordinates&nbsp;because,&nbsp;obviously,&nbsp;those&nbsp;coordinates&nbsp;would&nbsp;constantly&nbsp;be&nbsp;changing.&nbsp;&nbsp;&nbsp;I&nbsp;just&nbsp;want&nbsp;to&nbsp;be&nbsp;clear&nbsp;that&nbsp;these&nbsp;two&nbsp;issues,&nbsp;the&nbsp;ability&nbsp;to&nbsp;rotate&nbsp;MapShapeLayers,&nbsp;and&nbsp;an&nbsp;overall&nbsp;simplification&nbsp;of&nbsp;rotation,&nbsp;are&nbsp;TWO&nbsp;SEPARATE&nbsp;ISSUES,&nbsp;but&nbsp;if&nbsp;MapShapeLayers&nbsp;could&nbsp;be&nbsp;rotated&nbsp;I&nbsp;would&nbsp;expect&nbsp;that&nbsp;enhancement&nbsp;would&nbsp;be&nbsp;included&nbsp;in&nbsp;an&nbsp;overall&nbsp;simplification&nbsp;of&nbsp;rotation&nbsp;of&nbsp;all&nbsp;the&nbsp;layer&nbsp;types&nbsp;that&nbsp;currently&nbsp;do&nbsp;rotate.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Whew,&nbsp;I’m&nbsp;all&nbsp;rotated&nbsp;out&nbsp;and&nbsp;will&nbsp;find&nbsp;something&nbsp;else&nbsp;to&nbsp;work&nbsp;on&nbsp;today!&nbsp;  
&nbsp;&nbsp;  
&nbsp;Allen&nbsp;  
&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [April 13, 2011, 10:16am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/16 "2011-04-13T10:16:06Z")

</div>

Allen,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;post&nbsp;and&nbsp;question.&nbsp;  
&nbsp;&nbsp;  
&nbsp;About&nbsp;the&nbsp;requirement&nbsp;to&nbsp;get&nbsp;rotation&nbsp;supported&nbsp;in&nbsp;the&nbsp;MapShapeLayer,&nbsp;I&nbsp;am&nbsp;curious&nbsp;which&nbsp;one&nbsp;you&nbsp;are&nbsp;referring&nbsp;to&nbsp;in&nbsp;the&nbsp;following&nbsp;2&nbsp;cases:&nbsp;  
&nbsp;1.Rotate&nbsp;Point&nbsp;Feature&nbsp;locations,&nbsp;in&nbsp;this&nbsp;way,&nbsp;we&nbsp;probably&nbsp;need&nbsp;to&nbsp;set&nbsp;a&nbsp;pivot&nbsp;point.&nbsp;&nbsp;  
&nbsp;2.Rotate&nbsp;the&nbsp;images&nbsp;attached&nbsp;to&nbsp;the&nbsp;point&nbsp;features&nbsp;while&nbsp;keeping&nbsp;the&nbsp;point&nbsp;feature&nbsp;locations&nbsp;fixed.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Any&nbsp;more&nbsp;questions&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Yale&nbsp;

---

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [April 13, 2011, 1:01pm UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/17 "2011-04-13T13:01:51Z")

</div>

Hi&nbsp;Yale…&nbsp;  
&nbsp;&nbsp;  
&nbsp;Other&nbsp;layers,&nbsp;such&nbsp;as&nbsp;MsSql2008FeatureLayer&nbsp;or&nbsp;InMemoryFeatureLayer&nbsp;have&nbsp;a&nbsp;FeatureSource,&nbsp;have&nbsp;a&nbsp;Projection&nbsp;property&nbsp;to&nbsp;which&nbsp;I&nbsp;can&nbsp;attach&nbsp;a&nbsp;RotationProjection,&nbsp;and&nbsp;simply&nbsp;(more&nbsp;or&nbsp;less&nbsp;based&nbsp;on&nbsp;the&nbsp;theme&nbsp;of&nbsp;this&nbsp;posting)&nbsp;rotate&nbsp;the&nbsp;layer&nbsp;simply&nbsp;by&nbsp;changing&nbsp;the&nbsp;RotationProjection.Angle&nbsp;and&nbsp;refresh&nbsp;the&nbsp;map.&nbsp;&nbsp;A&nbsp;MapShapeLayer&nbsp;HAS&nbsp;NO&nbsp;FEATURE&nbsp;SOURCE&nbsp;and&nbsp;thus&nbsp;there&nbsp;is&nbsp;no&nbsp;easy&nbsp;way&nbsp;to&nbsp;rotate&nbsp;the&nbsp;shapes&nbsp;in&nbsp;the&nbsp;layer;&nbsp;I&nbsp;ended&nbsp;up&nbsp;calling&nbsp;a&nbsp;RotationProjection’s&nbsp;ConvertTo…Projection&nbsp;for&nbsp;each&nbsp;map&nbsp;shape&nbsp;and&nbsp;reloading&nbsp;the&nbsp;layer&nbsp;each&nbsp;time&nbsp;the&nbsp;map’s&nbsp;rotation&nbsp;is&nbsp;changed.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;But&nbsp;don’t&nbsp;take&nbsp;my&nbsp;word&nbsp;for&nbsp;it,&nbsp;it’s&nbsp;in&nbsp;the&nbsp;MapSuite&nbsp;documentation!&nbsp;&nbsp;Take&nbsp;a&nbsp;look&nbsp;at&nbsp;this&nbsp;wiki&nbsp;page&nbsp;documentation&nbsp;for&nbsp;MapShapeLayer…&nbsp;  
&nbsp;&nbsp;  
&nbsp;[wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Core](http://wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Core)&nbsp;  
&nbsp;&nbsp;  
&nbsp;where&nbsp;SOMEONE&nbsp;at&nbsp;ThinkGeo&nbsp;once&nbsp;said&nbsp;this:&nbsp;  
&nbsp;&nbsp;  
&nbsp;“Ideally&nbsp;I&nbsp;would&nbsp;want&nbsp;to&nbsp;make&nbsp;this&nbsp;inherit&nbsp;from&nbsp;the&nbsp;FeatureLayer&nbsp;so&nbsp;you&nbsp;could&nbsp;do&nbsp;spatial&nbsp;queries.&nbsp;In&nbsp;the&nbsp;interests&nbsp;of&nbsp;time&nbsp;I&nbsp;inherited&nbsp;from&nbsp;the&nbsp;Layer&nbsp;to&nbsp;make&nbsp;things&nbsp;simple&nbsp;and&nbsp;show&nbsp;the&nbsp;point&nbsp;of&nbsp;how&nbsp;easy&nbsp;it&nbsp;is&nbsp;to&nbsp;extend&nbsp;Map&nbsp;Suite.&nbsp;When&nbsp;we&nbsp;roll&nbsp;this&nbsp;into&nbsp;the&nbsp;main&nbsp;product&nbsp;we&nbsp;may&nbsp;create&nbsp;a&nbsp;FeatureSource&nbsp;and&nbsp;FeatureLayer.”&nbsp;  
&nbsp;&nbsp;  
&nbsp;This&nbsp;is&nbsp;what&nbsp;MapShapeLayer&nbsp;must&nbsp;be&nbsp;able&nbsp;to&nbsp;do&nbsp;to&nbsp;have&nbsp;any&nbsp;real&nbsp;value.&nbsp;&nbsp;If&nbsp;a&nbsp;FeatureSource&nbsp;is&nbsp;added,&nbsp;I&nbsp;can&nbsp;rotate&nbsp;a&nbsp;MapShapeLayer.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Allen

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [April 14, 2011, 9:06am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/18 "2011-04-14T09:06:09Z")

</div>

Hi,&nbsp;Allen,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;post&nbsp;and&nbsp;questions.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;think&nbsp;we&nbsp;did&nbsp;have&nbsp;some&nbsp;discussions&nbsp;and&nbsp;augments&nbsp;about&nbsp;MapShapeLayer&nbsp;inheritance;&nbsp;we&nbsp;did&nbsp;want&nbsp;to&nbsp;get&nbsp;it&nbsp;implemented&nbsp;by&nbsp;inheriting&nbsp;from&nbsp;the&nbsp;Feature&nbsp;layer&nbsp;instead&nbsp;of&nbsp;the&nbsp;layer,&nbsp;while&nbsp;we&nbsp;changed&nbsp;our&nbsp;ideas&nbsp;at&nbsp;last&nbsp;moment&nbsp;to&nbsp;make&nbsp;it&nbsp;simpler&nbsp;to&nbsp;use&nbsp;and&nbsp;make&nbsp;it&nbsp;easier&nbsp;to&nbsp;understand.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;think&nbsp;you&nbsp;have&nbsp;got&nbsp;the&nbsp;right&nbsp;direction&nbsp;to&nbsp;get&nbsp;Projection&nbsp;supported,&nbsp;if&nbsp;we&nbsp;want&nbsp;to&nbsp;enhance&nbsp;it,&nbsp;we&nbsp;definitely&nbsp;will&nbsp;go&nbsp;it&nbsp;in&nbsp;this&nbsp;way&nbsp;too,&nbsp;that&nbsp;is&nbsp;adding&nbsp;a&nbsp;Projection&nbsp;property,&nbsp;and&nbsp;&nbsp;project&nbsp;all&nbsp;the&nbsp;point&nbsp;features&nbsp;at&nbsp;the&nbsp;beginning&nbsp;of&nbsp;DrawCore.&nbsp;What&nbsp;do&nbsp;you&nbsp;think?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Any&nbsp;more&nbsp;questions&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Yale&nbsp;

---

<div class="post-metadata">

**Author:** ![Robert](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@Robert](https://community.thinkgeo.com/u/Robert)\
**Post date:** [April 14, 2011, 9:22am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/19 "2011-04-14T09:22:57Z")

</div>

Ok,&nbsp;my&nbsp;problem&nbsp;was&nbsp;caused&nbsp;by&nbsp;the&nbsp;programmer&nbsp;-&nbsp;me&nbsp;-&nbsp;as&nbsp;well.&nbsp;&nbsp;I&nbsp;was&nbsp;assigning&nbsp;the&nbsp;projection&nbsp;to&nbsp;all&nbsp;the&nbsp;FeatureLayers,&nbsp;but&nbsp;was&nbsp;not&nbsp;assigning&nbsp;it&nbsp;to&nbsp;the&nbsp;InMemoryLayers.&nbsp;&nbsp;The&nbsp;only&nbsp;remaining&nbsp;problem&nbsp;with&nbsp;rotation&nbsp;I&nbsp;have&nbsp;left&nbsp;is&nbsp;the&nbsp;MarkeOverlay&nbsp;doesn’t&nbsp;seem&nbsp;to&nbsp;take&nbsp;a&nbsp;projection.&nbsp;&nbsp;I&nbsp;will&nbsp;probably&nbsp;fix&nbsp;that&nbsp;by&nbsp;changing&nbsp;to&nbsp;an&nbsp;InMemoryLayer.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Now&nbsp;if&nbsp;InMemoryLayers&nbsp;would&nbsp;only&nbsp;support&nbsp;an&nbsp;animated&nbsp;GIF…&nbsp;&nbsp;:-)&nbsp;

---

<div class="post-metadata">

**Author:** ![Robert](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@Robert](https://community.thinkgeo.com/u/Robert)\
**Post date:** [April 14, 2011, 9:23am UTC](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661/20 "2011-04-14T09:23:00Z")

</div>

Ok,&nbsp;my&nbsp;problem&nbsp;was&nbsp;caused&nbsp;by&nbsp;the&nbsp;programmer&nbsp;-&nbsp;me&nbsp;-&nbsp;as&nbsp;well.&nbsp;&nbsp;I&nbsp;was&nbsp;assigning&nbsp;the&nbsp;projection&nbsp;to&nbsp;all&nbsp;the&nbsp;FeatureLayers,&nbsp;but&nbsp;was&nbsp;not&nbsp;assigning&nbsp;it&nbsp;to&nbsp;the&nbsp;InMemoryLayers.&nbsp;&nbsp;The&nbsp;only&nbsp;remaining&nbsp;problem&nbsp;with&nbsp;rotation&nbsp;I&nbsp;have&nbsp;left&nbsp;is&nbsp;the&nbsp;MarkeOverlay&nbsp;doesn’t&nbsp;seem&nbsp;to&nbsp;take&nbsp;a&nbsp;projection.&nbsp;&nbsp;I&nbsp;will&nbsp;probably&nbsp;fix&nbsp;that&nbsp;by&nbsp;changing&nbsp;to&nbsp;an&nbsp;InMemoryLayer.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Now&nbsp;if&nbsp;InMemoryLayers&nbsp;would&nbsp;only&nbsp;support&nbsp;an&nbsp;animated&nbsp;GIF…&nbsp;&nbsp;:-)&nbsp;

[Next page](https://community.thinkgeo.com/t/another-strange-map-rotation-incident/1661.md?page=2)
