# 5.0.151 error

**URL:** <https://community.thinkgeo.com/t/5-0-151-error/1814>\
**Category:** WinForms\
**Created:** [October 19, 2011, 9:03am UTC](https://community.thinkgeo.com/t/5-0-151-error/1814 "2011-10-19T09:03:40Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gary4](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/gary4/32/24993_2.png) [@Gary4](https://community.thinkgeo.com/u/Gary4)\
**Post date:** [October 19, 2011, 9:03am UTC](https://community.thinkgeo.com/t/5-0-151-error/1814/1 "2011-10-19T09:03:40Z")

</div>

I'm&nbsp;not&nbsp;sure&nbsp;if&nbsp;this&nbsp;is&nbsp;the&nbsp;right&nbsp;place&nbsp;to&nbsp;post&nbsp;this&nbsp;kind&nbsp;of&nbsp;thing,&nbsp;but&nbsp;I&nbsp;noticed&nbsp;when&nbsp;testing&nbsp;out&nbsp;Desktop&nbsp;5.0.151&nbsp;GoogleMapsOverlay&nbsp;objects&nbsp;cannot&nbsp;be&nbsp;created,&nbsp;there&nbsp;is&nbsp;a&nbsp;null&nbsp;object&nbsp;exception&nbsp;error.&nbsp;At&nbsp;least&nbsp;I&nbsp;recieved&nbsp;one&nbsp;when&nbsp;trying&nbsp;to&nbsp;create&nbsp;the&nbsp;object.&nbsp;I&nbsp;switched&nbsp;back&nbsp;to&nbsp;5.0.129&nbsp;and&nbsp;GoogleMapsOverlay&nbsp;worked&nbsp;again.&nbsp;

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [October 19, 2011, 11:57am UTC](https://community.thinkgeo.com/t/5-0-151-error/1814/2 "2011-10-19T11:57:37Z")

</div>

Hello&nbsp;Gary,&nbsp;  
  
  
  
Yes,&nbsp;we&nbsp;have&nbsp;changed&nbsp;some&nbsp;code&nbsp;in&nbsp;GoogleMapsOverlay&nbsp;2&nbsp;weeks&nbsp;ago,&nbsp;and&nbsp;made&nbsp;a&nbsp;newest&nbsp;change&nbsp;today&nbsp;earlier,&nbsp;could&nbsp;you&nbsp;please&nbsp;download&nbsp;the&nbsp;newest&nbsp;version(5.0.160.0)&nbsp;tomorrow&nbsp;and&nbsp;have&nbsp;another&nbsp;try?&nbsp;  
  
  
  
If&nbsp;you&nbsp;still&nbsp;meet&nbsp;this&nbsp;problem,&nbsp;could&nbsp;you&nbsp;please&nbsp;provide&nbsp;some&nbsp;code?&nbsp;  
  
  
  
Regards,&nbsp;  
  
  
  
Gary

---

<div class="post-metadata">

**Author:** ![Gary4](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/gary4/32/24993_2.png) [@Gary4](https://community.thinkgeo.com/u/Gary4)\
**Post date:** [October 24, 2011, 7:58am UTC](https://community.thinkgeo.com/t/5-0-151-error/1814/3 "2011-10-24T07:58:29Z")

</div>

Hi,&nbsp;so&nbsp;the&nbsp;latest&nbsp;version&nbsp;is&nbsp;fine.&nbsp;I&nbsp;do&nbsp;however&nbsp;have&nbsp;one&nbsp;more&nbsp;question.&nbsp;GoogleMaps&nbsp;and&nbsp;OpenStreetMaps&nbsp;are&nbsp;in&nbsp;units&nbsp;Meters&nbsp;while&nbsp;WorldMapKit&nbsp;is&nbsp;in&nbsp;Degree&nbsp;Decimals.&nbsp;I&nbsp;would&nbsp;like&nbsp;to&nbsp;make&nbsp;all&nbsp;three&nbsp;maps&nbsp;interchangeable&nbsp;and&nbsp;available&nbsp;to&nbsp;the&nbsp;user.&nbsp;I&nbsp;know&nbsp;you&nbsp;can&nbsp;change&nbsp;the&nbsp;projection&nbsp;on&nbsp;a&nbsp;given&nbsp;layer&nbsp;to&nbsp;work&nbsp;with&nbsp;meter&nbsp;unit&nbsp;maps.&nbsp;Does&nbsp;this&nbsp;projection&nbsp;change&nbsp;work&nbsp;with&nbsp;every&nbsp;kind&nbsp;of&nbsp;layer&nbsp;you&nbsp;have?&nbsp;i.e.&nbsp;(inmemoryfeaturelayer,&nbsp;simplemarkerlayer…)&nbsp;Would&nbsp;I&nbsp;have&nbsp;to&nbsp;change&nbsp;the&nbsp;projection&nbsp;of&nbsp;every&nbsp;layer&nbsp;every&nbsp;time&nbsp;I&nbsp;switch&nbsp;between&nbsp;meter&nbsp;to&nbsp;decimaldegree&nbsp;maps&nbsp;or&nbsp;is&nbsp;there&nbsp;a&nbsp;way&nbsp;to&nbsp;change&nbsp;the&nbsp;googlemapoverlay&nbsp;itself.

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [October 24, 2011, 8:53am UTC](https://community.thinkgeo.com/t/5-0-151-error/1814/4 "2011-10-24T08:53:30Z")

</div>

Hello&nbsp;Gary,&nbsp;  
  
  
  
I'm&nbsp;glad&nbsp;it's&nbsp;working&nbsp;now.&nbsp;  
  
  
  
And&nbsp;sorry&nbsp;to&nbsp;say,&nbsp;we&nbsp;can't&nbsp;let&nbsp;the&nbsp;googlemap&nbsp;use&nbsp;decimals&nbsp;degree,&nbsp;so&nbsp;that&nbsp;if&nbsp;you&nbsp;want&nbsp;to&nbsp;use&nbsp;thinkgeo&nbsp;map&nbsp;work&nbsp;with&nbsp;googlemap&nbsp;together,&nbsp;you&nbsp;have&nbsp;to&nbsp;change&nbsp;the&nbsp;projection&nbsp;of&nbsp;thinkgeo&nbsp;map.&nbsp;  
  
  
  
The&nbsp;FeatureSource.Projection&nbsp;if&nbsp;a&nbsp;property&nbsp;of&nbsp;BaseClass&nbsp;FeatureLayer,&nbsp;so&nbsp;projection&nbsp;work&nbsp;with&nbsp;every&nbsp;kind&nbsp;of&nbsp;layer&nbsp;we&nbsp;have.&nbsp;  
  
  
  
And&nbsp;if&nbsp;you&nbsp;need&nbsp;to&nbsp;switch&nbsp;the&nbsp;map&nbsp;unit&nbsp;between&nbsp;meter&nbsp;and&nbsp;decimal&nbsp;degress,&nbsp;you&nbsp;truly&nbsp;need&nbsp;some&nbsp;logic&nbsp;code&nbsp;to&nbsp;control&nbsp;the&nbsp;projection&nbsp;change&nbsp;everytime.&nbsp;  
  
  
  
Regards,&nbsp;  
  
  
  
Gary

---

<div class="post-metadata">

**Author:** ![Gary4](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/gary4/32/24993_2.png) [@Gary4](https://community.thinkgeo.com/u/Gary4)\
**Post date:** [October 24, 2011, 9:13am UTC](https://community.thinkgeo.com/t/5-0-151-error/1814/5 "2011-10-24T09:13:24Z")

</div>

Alright,&nbsp;that’s&nbsp;not&nbsp;a&nbsp;huge&nbsp;problem.&nbsp;FeatureSource.Projection&nbsp;is&nbsp;a&nbsp;property&nbsp;of&nbsp;BaseClass&nbsp;FeatureLayer.&nbsp;What&nbsp;about&nbsp;SimpleMarkerOverlay?&nbsp;I&nbsp;can’t&nbsp;seem&nbsp;to&nbsp;find&nbsp;the&nbsp;projection&nbsp;property&nbsp;in&nbsp;that.

---

<div class="post-metadata">

**Author:** ![Gary4](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/gary4/32/24993_2.png) [@Gary4](https://community.thinkgeo.com/u/Gary4)\
**Post date:** [October 24, 2011, 9:53am UTC](https://community.thinkgeo.com/t/5-0-151-error/1814/6 "2011-10-24T09:53:34Z")

</div>

Also,&nbsp;I’d&nbsp;like&nbsp;to&nbsp;be&nbsp;able&nbsp;to&nbsp;create&nbsp;default&nbsp;styles&nbsp;for&nbsp;markers.&nbsp;Currently&nbsp;I&nbsp;can&nbsp;only&nbsp;find&nbsp;the&nbsp;Image&nbsp;property&nbsp;which&nbsp;only&nbsp;accepts&nbsp;an&nbsp;image.&nbsp;I&nbsp;would&nbsp;like&nbsp;to&nbsp;be&nbsp;able&nbsp;to&nbsp;set&nbsp;some&nbsp;default&nbsp;styles&nbsp;such&nbsp;as&nbsp;a&nbsp;simple&nbsp;blue&nbsp;circle&nbsp;with&nbsp;a&nbsp;black&nbsp;outline&nbsp;to&nbsp;markers.&nbsp;Another&nbsp;solution&nbsp;would&nbsp;be&nbsp;to&nbsp;use&nbsp;an&nbsp;inmemoryfeature&nbsp;layer&nbsp;and&nbsp;pointshapes&nbsp;but&nbsp;be&nbsp;able&nbsp;to&nbsp;edit&nbsp;the&nbsp;default&nbsp;style&nbsp;of&nbsp;each&nbsp;individual&nbsp;pointshape.

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [October 24, 2011, 1:51pm UTC](https://community.thinkgeo.com/t/5-0-151-error/1814/7 "2011-10-24T13:51:46Z")

</div>

Hello&nbsp;Gary,&nbsp;  
  
  
  
SimpleMarkerOverlay&nbsp;is&nbsp;an&nbsp;Overlay&nbsp;not&nbsp;a&nbsp;FeatureLayer,&nbsp;so&nbsp;it&nbsp;didn't&nbsp;including&nbsp;projection&nbsp;property.&nbsp;  
  
  
  
If&nbsp;you&nbsp;want&nbsp;to&nbsp;use&nbsp;it&nbsp;work&nbsp;with&nbsp;GoogleMap,&nbsp;you&nbsp;need&nbsp;transform&nbsp;the&nbsp;pointshape&nbsp;location&nbsp;before&nbsp;you&nbsp;add&nbsp;it&nbsp;into&nbsp;marker.&nbsp;  
  
  
  
Please&nbsp;look&nbsp;at&nbsp;this&nbsp;post,&nbsp;Val's&nbsp;code&nbsp;can&nbsp;show&nbsp;you&nbsp;some&nbsp;idea,&nbsp;though&nbsp;he&nbsp;didn't&nbsp;use&nbsp;the&nbsp;SimpleMarkerOverlay,&nbsp;but&nbsp;the&nbsp;principle&nbsp;is&nbsp;the&nbsp;same,&nbsp;also&nbsp;you&nbsp;can&nbsp;try&nbsp;his&nbsp;code&nbsp;as&nbsp;another&nbsp;way.&nbsp;  
  
[gis.thinkgeo.com/Support/Discussion...fault.aspx](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/12/aft/6858/afv/topic/Default.aspx)  
  
And&nbsp;this&nbsp;post&nbsp;can&nbsp;show&nbsp;you&nbsp;how&nbsp;to&nbsp;define&nbsp;a&nbsp;custom&nbsp;marker&nbsp;to&nbsp;fit&nbsp;your&nbsp;situation.&nbsp;  
  
[gis.thinkgeo.com/Support/Discussion...fault.aspx](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/39/aft/8319/afv/topic/Default.aspx)  
  
  
  
Just&nbsp;let&nbsp;me&nbsp;know&nbsp;if&nbsp;you&nbsp;meet&nbsp;problems.&nbsp;  
  
  
  
Regards,&nbsp;  
  
  
  
Gary

---

<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:** [October 25, 2011, 10:45am UTC](https://community.thinkgeo.com/t/5-0-151-error/1814/8 "2011-10-25T10:45:12Z")

</div>

Gary,

&nbsp;&nbsp;I&nbsp;would&nbsp;like&nbsp;to&nbsp;add&nbsp;a&nbsp;comment&nbsp;to&nbsp;your&nbsp;post&nbsp;of&nbsp;10-24-2011&nbsp;08:58&nbsp;AM.&nbsp;It&nbsp;is&nbsp;actually&nbsp;possible&nbsp;to&nbsp;get&nbsp;GoogleMap&nbsp;to&nbsp;decimal&nbsp;degrees.&nbsp;Look&nbsp;at&nbsp;the&nbsp;sample&nbsp;_Google&nbsp;Map&nbsp;to&nbsp;Geodetic&nbsp;&nbsp;_[wiki.thinkgeo.com/wiki/Map\_Suite\_De...o\_Geodetic](http://wiki.thinkgeo.com/wiki/Map_Suite_Desktop_Edition_Projection_Samples#Google_Map_to_Geodetic)

&nbsp;Keep&nbsp;in&nbsp;mind&nbsp;that&nbsp;this&nbsp;is&nbsp;a&nbsp;trick&nbsp;to&nbsp;get&nbsp;your&nbsp;Google&nbsp;Map&nbsp;to&nbsp;display&nbsp;in&nbsp;decimal&nbsp;degrees&nbsp;and&nbsp;it&nbsp;has&nbsp;a&nbsp;lot&nbsp;of&nbsp;limitations&nbsp;as&nbsp;you&nbsp;can&nbsp;read&nbsp;in&nbsp;the&nbsp;description&nbsp;of&nbsp;the&nbsp;sample.&nbsp;But&nbsp;I&nbsp;thought&nbsp;you&nbsp;might&nbsp;want&nbsp;to&nbsp;be&nbsp;interested&nbsp;in&nbsp;this.&nbsp;Thank&nbsp;you.

---

<div class="post-metadata">

**Author:** ![Gary4](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/gary4/32/24993_2.png) [@Gary4](https://community.thinkgeo.com/u/Gary4)\
**Post date:** [October 25, 2011, 12:34pm UTC](https://community.thinkgeo.com/t/5-0-151-error/1814/9 "2011-10-25T12:34:46Z")

</div>

I’ve&nbsp;decided&nbsp;to&nbsp;stick&nbsp;with&nbsp;inmemoryfeature&nbsp;layers,&nbsp;since&nbsp;they&nbsp;it&nbsp;seems&nbsp;like&nbsp;the&nbsp;only&nbsp;way&nbsp;to&nbsp;work&nbsp;with&nbsp;googlemaps&nbsp;and&nbsp;longitude/latitude&nbsp;coordinates&nbsp;is&nbsp;to&nbsp;change&nbsp;the&nbsp;projection&nbsp;of&nbsp;the&nbsp;layer&nbsp;like&nbsp;in&nbsp;the&nbsp;first&nbsp;link&nbsp;Gary&nbsp;provided.&nbsp;Thanks&nbsp;for&nbsp;the&nbsp;post&nbsp;Val&nbsp;but&nbsp;I&nbsp;don’t&nbsp;think&nbsp;that&nbsp;will&nbsp;work&nbsp;for&nbsp;my&nbsp;project.&nbsp;Although&nbsp;the&nbsp;limitation&nbsp;to&nbsp;inmemoryfeature&nbsp;lays&nbsp;is&nbsp;that&nbsp;it&nbsp;seems&nbsp;all&nbsp;features&nbsp;in&nbsp;the&nbsp;layer&nbsp;are&nbsp;set&nbsp;to&nbsp;the&nbsp;same&nbsp;style.&nbsp;Is&nbsp;there&nbsp;a&nbsp;way&nbsp;to&nbsp;have&nbsp;multiple&nbsp;features&nbsp;on&nbsp;a&nbsp;layer&nbsp;with&nbsp;different&nbsp;styles?

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [October 26, 2011, 2:42am UTC](https://community.thinkgeo.com/t/5-0-151-error/1814/10 "2011-10-26T02:42:02Z")

</div>

Hello&nbsp;Gary,&nbsp;  
&nbsp;&nbsp;  
&nbsp;If&nbsp;you&nbsp;want&nbsp;to&nbsp;draw&nbsp;different&nbsp;style&nbsp;of&nbsp;features&nbsp;for&nbsp;your&nbsp;InMemoryLayer&nbsp;you&nbsp;can&nbsp;use&nbsp;either&nbsp;the&nbsp;ValueStyle,&nbsp;ClassBreakStyle&nbsp;or&nbsp;RegExStyle.&nbsp;Each&nbsp;of&nbsp;these&nbsp;will&nbsp;allow&nbsp;you&nbsp;to&nbsp;draw&nbsp;a&nbsp;different&nbsp;style&nbsp;for&nbsp;each&nbsp;features&nbsp;based&nbsp;upon&nbsp;a&nbsp;column&nbsp;value&nbsp;in&nbsp;your&nbsp;InMemoryLayer.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;ValueStyle&nbsp;:&nbsp;This&nbsp;class&nbsp;allows&nbsp;you&nbsp;to&nbsp;match&nbsp;a&nbsp;value&nbsp;with&nbsp;data&nbsp;in&nbsp;the&nbsp;feature&nbsp;to&nbsp;determine&nbsp;how&nbsp;to&nbsp;draw&nbsp;that&nbsp;feature.&nbsp;&nbsp;  
&nbsp;ClassBreakStyle&nbsp;:&nbsp;This&nbsp;class&nbsp;represents&nbsp;a&nbsp;style&nbsp;based&nbsp;on&nbsp;class&nbsp;break&nbsp;values(A&nbsp;range&nbsp;of&nbsp;values).&nbsp;&nbsp;  
&nbsp;RegExStyle&nbsp;:&nbsp;This&nbsp;class&nbsp;allows&nbsp;you&nbsp;to&nbsp;draw&nbsp;features&nbsp;differently&nbsp;based&nbsp;on&nbsp;regular&nbsp;expression&nbsp;matching.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;We&nbsp;have&nbsp;samples&nbsp;for&nbsp;them,&nbsp;they&nbsp;are&nbsp;DrawAFeatureBasedOnAValue,&nbsp;DrawThematicFeatures&nbsp;and&nbsp;DrawFeaturesBasedRegularExpression.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary

---

<div class="post-metadata">

**Author:** ![Gary4](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/gary4/32/24993_2.png) [@Gary4](https://community.thinkgeo.com/u/Gary4)\
**Post date:** [October 26, 2011, 9:19am UTC](https://community.thinkgeo.com/t/5-0-151-error/1814/11 "2011-10-26T09:19:58Z")

</div>

Thanks!&nbsp;That’s&nbsp;exactly&nbsp;what&nbsp;I&nbsp;needed&nbsp;and&nbsp;it&nbsp;works&nbsp;perfectly.&nbsp;One&nbsp;thing&nbsp;I&nbsp;noticed&nbsp;though&nbsp;is&nbsp;that&nbsp;my&nbsp;ellipses&nbsp;get&nbsp;elongated&nbsp;as&nbsp;they&nbsp;move&nbsp;north&nbsp;and&nbsp;south.&nbsp;I&nbsp;want&nbsp;them&nbsp;to&nbsp;be&nbsp;perfect&nbsp;circles,&nbsp;but&nbsp;depending&nbsp;on&nbsp;where&nbsp;I&nbsp;put&nbsp;them&nbsp;on&nbsp;the&nbsp;map&nbsp;they&nbsp;look&nbsp;funny.&nbsp;The&nbsp;Height&nbsp;and&nbsp;Width&nbsp;stay&nbsp;the&nbsp;same&nbsp;but&nbsp;if&nbsp;I&nbsp;put&nbsp;the&nbsp;center&nbsp;of&nbsp;the&nbsp;circle&nbsp;northern&nbsp;of&nbsp;southern&nbsp;it&nbsp;looks&nbsp;oval.

---

<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:** [October 26, 2011, 3:56pm UTC](https://community.thinkgeo.com/t/5-0-151-error/1814/12 "2011-10-26T15:56:54Z")

</div>

Gary,

&nbsp;About&nbsp;the&nbsp;circle&nbsp;looking&nbsp;oval&nbsp;with&nbsp;a&nbsp;map&nbsp;in&nbsp;decimal&nbsp;degrees,&nbsp;there&nbsp;is&nbsp;a&nbsp;previous&nbsp;post&nbsp;where&nbsp;I&nbsp;go&nbsp;in&nbsp;length&nbsp;about&nbsp;the&nbsp;explanation&nbsp;and&nbsp;to&nbsp;approach&nbsp;the&nbsp;problem.&nbsp;The&nbsp;post&nbsp;is&nbsp;"GetArea&nbsp;on&nbsp;Buffered&nbsp;shape&nbsp;not&nbsp;working&nbsp;as&nbsp;expected"&nbsp;&nbsp;[gis.thinkgeo.com/Support/Discussion...fault.aspx](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/6565/afv/topic/Default.aspx)

I&nbsp;particularly&nbsp;recommend&nbsp;that&nbsp;you&nbsp;read&nbsp;the&nbsp;post&nbsp;I&nbsp;wrote&nbsp;on&nbsp;11-10-2009&nbsp;10:49&nbsp;AM.&nbsp;You&nbsp;will&nbsp;find&nbsp;the&nbsp;concrete&nbsp;solution&nbsp;on&nbsp;how&nbsp;to&nbsp;approach&nbsp;this&nbsp;issue.

&nbsp;So,&nbsp;for&nbsp;example,&nbsp;if&nbsp;you&nbsp;want&nbsp;to&nbsp;draw&nbsp;a&nbsp;circle&nbsp;at&nbsp;the&nbsp;location&nbsp;-80&nbsp;of&nbsp;longitude&nbsp;and&nbsp;45&nbsp;of&nbsp;latitude,&nbsp;use&nbsp;the&nbsp;following&nbsp;code:

&nbsp;

`   //Fist we get the equivalent in decimal degrees for a distance of 1 km at longitude 80 West    double latDiff = DecimalDegreesHelper.GetLatitudeDifferenceFromDistance(1, DistanceUnit.Kilometer, -80);    //Second, we build the circle using decimal degrees    EllipseShape myCircle = new EllipseShape(new PointShape(-80, 45), latDiff);`
