# Navigate to lat/long coordinates

**URL:** <https://community.thinkgeo.com/t/navigate-to-lat-long-coordinates/3494>\
**Category:** WPF\
**Created:** [August 19, 2013, 2:49pm UTC](https://community.thinkgeo.com/t/navigate-to-lat-long-coordinates/3494 "2013-08-19T14:49:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scott2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@Scott2](https://community.thinkgeo.com/u/Scott2)\
**Post date:** [August 19, 2013, 2:49pm UTC](https://community.thinkgeo.com/t/navigate-to-lat-long-coordinates/3494/1 "2013-08-19T14:49:50Z")

</div>

I&nbsp;am&nbsp;new&nbsp;to&nbsp;the&nbsp;thinkgeo&nbsp;control,&nbsp;so&nbsp;I&nbsp;have&nbsp;a&nbsp;simple&nbsp;question.  
  
  
  
How&nbsp;do&nbsp;I&nbsp;navigate&nbsp;to&nbsp;or&nbsp;center&nbsp;my&nbsp;wpf&nbsp;map&nbsp;on&nbsp;a&nbsp;given&nbsp;lat/long&nbsp;coordinate?&nbsp;I’m&nbsp;using&nbsp;the&nbsp;GoogleMapsOverlay

---

<div class="post-metadata">

**Author:** ![Summer1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Summer1](https://community.thinkgeo.com/u/Summer1)\
**Post date:** [August 19, 2013, 9:19pm UTC](https://community.thinkgeo.com/t/navigate-to-lat-long-coordinates/3494/2 "2013-08-19T21:19:48Z")

</div>

Hi&nbsp;Scott,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;post,&nbsp;and&nbsp;welcome&nbsp;to&nbsp;MapSuite&nbsp;world!&nbsp;would&nbsp;you&nbsp;please&nbsp;use&nbsp;Map.CenterAt&nbsp;with&nbsp;following&nbsp;code?&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;void&nbsp;WpfMap\_Loaded(object&nbsp;sender,&nbsp;RoutedEventArgs&nbsp;e)&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Map1.MapUnit&nbsp;=&nbsp;GeographyUnit.Meter;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Map1.CurrentExtent&nbsp;=&nbsp;new&nbsp;RectangleShape(-5000000,&nbsp;5000000,&nbsp;5000000,&nbsp;-5000000);&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GoogleMapsOverlay&nbsp;worldOverlay&nbsp;=&nbsp;new&nbsp;GoogleMapsOverlay();&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Map1.CenterAt(new&nbsp;Feature(YourLongitude&nbsp;,YourLatitude));&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Map1.Overlays.Add("WMK",&nbsp;worldOverlay);&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Map1.Refresh();&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;  
&nbsp;&nbsp;  
&nbsp;Another&nbsp;thing&nbsp;for&nbsp;your&nbsp;information&nbsp;is&nbsp;that&nbsp;Map1.ZoomIntoCenter()&nbsp;and&nbsp;Map1.ZoomOuttoCenter(),&nbsp;could&nbsp;not&nbsp;just&nbsp;centerat&nbsp;but&nbsp;also&nbsp;zoomin&nbsp;or&nbsp;out&nbsp;at&nbsp;same&nbsp;time.&nbsp;  
&nbsp;&nbsp;  
&nbsp;if&nbsp;you&nbsp;have&nbsp;any&nbsp;more&nbsp;question&nbsp;,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Best&nbsp;Regards&nbsp;  
&nbsp;&nbsp;  
&nbsp;Summer

---

<div class="post-metadata">

**Author:** ![Scott2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@Scott2](https://community.thinkgeo.com/u/Scott2)\
**Post date:** [August 20, 2013, 7:28am UTC](https://community.thinkgeo.com/t/navigate-to-lat-long-coordinates/3494/3 "2013-08-20T07:28:05Z")

</div>

Thanks&nbsp;for&nbsp;the&nbsp;reply.&nbsp;&nbsp;I&nbsp;put&nbsp;that&nbsp;in,&nbsp;but&nbsp;when&nbsp;I&nbsp;put&nbsp;the&nbsp;coordinates&nbsp;in&nbsp;for&nbsp;the&nbsp;usa,&nbsp;it&nbsp;is&nbsp;showing&nbsp;africa&nbsp;and&nbsp;south&nbsp;america&nbsp;instead.

---

<div class="post-metadata">

**Author:** ![Summer1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Summer1](https://community.thinkgeo.com/u/Summer1)\
**Post date:** [August 20, 2013, 8:25pm UTC](https://community.thinkgeo.com/t/navigate-to-lat-long-coordinates/3494/4 "2013-08-20T20:25:35Z")

</div>

Hi&nbsp;Scott,&nbsp;  
&nbsp;&nbsp;  
&nbsp;This&nbsp;should&nbsp;be&nbsp;because&nbsp;the&nbsp;lat&nbsp;and&nbsp;lon&nbsp;themselves&nbsp;don’t&nbsp;belong&nbsp;to&nbsp;google&nbsp;projection,&nbsp;so&nbsp;it&nbsp;needs&nbsp;a&nbsp;projection&nbsp;convertion.&nbsp;If&nbsp;the&nbsp;lat&nbsp;and&nbsp;lon&nbsp;belong&nbsp;to&nbsp;EPSG:4326&nbsp;then&nbsp;would&nbsp;you&nbsp;please&nbsp;try&nbsp;following&nbsp;code:&nbsp;  
&nbsp;&nbsp;  
&nbsp;private&nbsp;void&nbsp;WpfMap\_Loaded(object&nbsp;sender,&nbsp;RoutedEventArgs&nbsp;e)&nbsp;&nbsp;  
&nbsp;{&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ManagedProj4Projection&nbsp;proj&nbsp;=&nbsp;new&nbsp;ManagedProj4Projection();&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proj.InternalProjectionParametersString&nbsp;=&nbsp;ManagedProj4Projection.GetEpsgParametersString(4326);&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proj.ExternalProjectionParametersString&nbsp;=&nbsp;ManagedProj4Projection.GetGoogleMapParametersString();&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proj.Open();&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vertex&nbsp;projectedShape&nbsp;=&nbsp;proj.ConvertToExternalProjection(yourLongitude,&nbsp;yourLatitude);&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Map1.MapUnit&nbsp;=&nbsp;GeographyUnit.Meter;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Map1.CurrentExtent&nbsp;=&nbsp;new&nbsp;RectangleShape(-5000000,&nbsp;5000000,&nbsp;5000000,&nbsp;-5000000);&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GoogleMapsOverlay&nbsp;worldOverlay&nbsp;=&nbsp;new&nbsp;GoogleMapsOverlay();&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Map1.CenterAt(new&nbsp;Feature(projectedShape));&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Map1.Overlays.Add(“WMK”,&nbsp;worldOverlay);&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Map1.Refresh();&nbsp;  
&nbsp;}&nbsp;  
&nbsp;&nbsp;  
&nbsp;if&nbsp;you&nbsp;have&nbsp;any&nbsp;more&nbsp;question&nbsp;,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Best&nbsp;Regards&nbsp;  
&nbsp;&nbsp;  
&nbsp;Summer
