<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Calculating distance for multiple/different spatial references in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/calculating-distance-for-multiple-different/m-p/144552#M3607</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an "auto center" feature that basically centers the map on all the visible graphics in a layer. When centering on items it needs to add a buffer to the envelope so that the farthest out items do not appear right on the edge of the map.&amp;nbsp; The buffer used (0.01) has been a fixed number for us when we were only using WKID 4326 as a spatial reference but now we have also added support for Web Mercator so this means our buffer number must be variable depending on the spatial reference used. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;I would like to have a buffer of 1/4 of a mile. What is the best/recommened way to calculate distance for different coordinate systems? &lt;/STRONG&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 May 2011 19:41:22 GMT</pubDate>
    <dc:creator>MarkCollins</dc:creator>
    <dc:date>2011-05-06T19:41:22Z</dc:date>
    <item>
      <title>Calculating distance for multiple/different spatial references</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/calculating-distance-for-multiple-different/m-p/144552#M3607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an "auto center" feature that basically centers the map on all the visible graphics in a layer. When centering on items it needs to add a buffer to the envelope so that the farthest out items do not appear right on the edge of the map.&amp;nbsp; The buffer used (0.01) has been a fixed number for us when we were only using WKID 4326 as a spatial reference but now we have also added support for Web Mercator so this means our buffer number must be variable depending on the spatial reference used. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;I would like to have a buffer of 1/4 of a mile. What is the best/recommened way to calculate distance for different coordinate systems? &lt;/STRONG&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 19:41:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/calculating-distance-for-multiple-different/m-p/144552#M3607</guid>
      <dc:creator>MarkCollins</dc:creator>
      <dc:date>2011-05-06T19:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating distance for multiple/different spatial references</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/calculating-distance-for-multiple-different/m-p/144553#M3608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Instead of relying on a specific distance, for this scenario I usually like to have a ratio of space. Ie. 5% space around the contents I center on. So that means that for large elements/layers, the distance is larger than for small ones.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can easily accomplish that using the Expand method on Envelope:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; MyMap.ZoomTo( myEnvelope.Expand(1.05) );&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note though that you might want to have a minimum size as well (for instance in case it's the envelope of a point it would be an infinitely small area)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 20:59:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/calculating-distance-for-multiple-different/m-p/144553#M3608</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2011-05-06T20:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating distance for multiple/different spatial references</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/calculating-distance-for-multiple-different/m-p/144554#M3609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Excellent suggestion, this worked great. Thank you very much.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 21:09:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/calculating-distance-for-multiple-different/m-p/144554#M3609</guid>
      <dc:creator>MarkCollins</dc:creator>
      <dc:date>2011-05-06T21:09:21Z</dc:date>
    </item>
  </channel>
</rss>

