<?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 Re: using envelope center and envelope angle to compute extent. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-envelope-center-and-envelope-angle-to/m-p/267054#M24683</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK.&amp;nbsp; Looks like I'll have to rethink this and consult with the senior dev on it.&amp;nbsp; This isn't really my project - I'm just helping out with it.&amp;nbsp; Not sure we have the necessary data relationships in the client side data model to perform the querying that we need to do.&amp;nbsp; Have to see.&lt;/P&gt;&lt;P&gt;In any case, thanks for your advice on this - at least I know what I'm doing is a dead end.&amp;nbsp; &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Mar 2017 15:10:13 GMT</pubDate>
    <dc:creator>DaveSouthern</dc:creator>
    <dc:date>2017-03-21T15:10:13Z</dc:date>
    <item>
      <title>using envelope center and envelope angle to compute extent.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-envelope-center-and-envelope-angle-to/m-p/267050#M24679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got a problem.&lt;/P&gt;&lt;P&gt;I have an asp.net mvc app where I need to display a map zoomed to the extent of a number of features.&amp;nbsp; So what I did was union all the features together using DbGeometry on the server side, and then passed the envelope object to the client as a WKT and use that to compute the map extent as shown below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; require([&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"dojo/parser"&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"dijit/layout/TabContainer"&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"dijit/layout/ContentPane"&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;]);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; mapArgs = {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; sliderStyle: &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;"small"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; sliderPosition: &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;"top-right"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; basemap: &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;"topo"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: small; font-family: Consolas;"&gt;//get the default extent, if specified&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; parser = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; geometryWktParser();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; defaultBounds = parser.loadPolygonGeographic(&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;@Model.qdArcsExtent&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;mapArgs.extent = defaultBounds.getExtent();&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: small; font-family: Consolas;"&gt;//build the map&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; require([&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;"esri/map"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;"dojo/domReady!"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;], &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; (Map) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; map2 = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: small; font-family: Consolas;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt; Map(&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas;"&gt;"qdMap"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas;"&gt;, mapArgs);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, this doesn't seem to work real well. The map extent is either off center from where it should be or not big enough to display all the features - or both.&amp;nbsp; Sometimes it isn't off by much, but other times it's wildly off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I tried using DbGeography instead of DbGeometry, but DbGeography doesn't have any kind of envelope or extent.&amp;nbsp; So then I tried SqlGeography.&amp;nbsp; SqlGeography has EnvelopeCenter and EnvelopeAngle.&amp;nbsp; How would I use these to compute the map&amp;nbsp;extent on the client side - is it even possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 15:40:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-envelope-center-and-envelope-angle-to/m-p/267050#M24679</guid>
      <dc:creator>DaveSouthern</dc:creator>
      <dc:date>2017-03-20T15:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: using envelope center and envelope angle to compute extent.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-envelope-center-and-envelope-angle-to/m-p/267051#M24680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's no reason you can't do this in the client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would check out&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/esri.graphicsutils-amd.html" title="https://developers.arcgis.com/javascript/3/jsapi/esri.graphicsutils-amd.html"&gt;esri/graphicsUtils | API Reference | ArcGIS API for JavaScript 3.20&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The graphicsExtent method will take an array of Graphics (features) and return an extent. &amp;nbsp;What you need to do is find out where your graphics are getting stored in the client.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 20:35:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-envelope-center-and-envelope-angle-to/m-p/267051#M24680</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-03-20T20:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: using envelope center and envelope angle to compute extent.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-envelope-center-and-envelope-angle-to/m-p/267052#M24681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I'm guessing from what you've said that there's no way to use the envelope point and angle on the client side to set the extent?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2017 00:42:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-envelope-center-and-envelope-angle-to/m-p/267052#M24681</guid>
      <dc:creator>DaveSouthern</dc:creator>
      <dc:date>2017-03-21T00:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: using envelope center and envelope angle to compute extent.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-envelope-center-and-envelope-angle-to/m-p/267053#M24682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I know, there isn't any way to generate a polygon or extent from a point and an angle.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2017 12:55:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-envelope-center-and-envelope-angle-to/m-p/267053#M24682</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-03-21T12:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: using envelope center and envelope angle to compute extent.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-envelope-center-and-envelope-angle-to/m-p/267054#M24683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK.&amp;nbsp; Looks like I'll have to rethink this and consult with the senior dev on it.&amp;nbsp; This isn't really my project - I'm just helping out with it.&amp;nbsp; Not sure we have the necessary data relationships in the client side data model to perform the querying that we need to do.&amp;nbsp; Have to see.&lt;/P&gt;&lt;P&gt;In any case, thanks for your advice on this - at least I know what I'm doing is a dead end.&amp;nbsp; &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2017 15:10:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-envelope-center-and-envelope-angle-to/m-p/267054#M24683</guid>
      <dc:creator>DaveSouthern</dc:creator>
      <dc:date>2017-03-21T15:10:13Z</dc:date>
    </item>
  </channel>
</rss>

