<?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: How can I get a graphic for feature without a map? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-get-a-graphic-for-feature-without-a-map/m-p/78518#M7142</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create a graphic without having a map.&amp;nbsp;Here&amp;nbsp;is a sample:&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/benesri/pen/XWWKbwK?editors=1000" title="https://codepen.io/benesri/pen/XWWKbwK?editors=1000"&gt;https://codepen.io/benesri/pen/XWWKbwK?editors=1000&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Oct 2019 22:20:52 GMT</pubDate>
    <dc:creator>BenElan</dc:creator>
    <dc:date>2019-10-15T22:20:52Z</dc:date>
    <item>
      <title>How can I get a graphic for feature without a map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-get-a-graphic-for-feature-without-a-map/m-p/78514#M7138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I select a feature on a map and use &lt;SPAN style="font-family: 'andale mono', monospace; color: #0000ff;"&gt;popup.getSelectedFeature()&lt;/SPAN&gt; I get a great JSON object that&amp;nbsp;has all kinds of information about the feature, including: feature attributes, the layer the feature is on, etc. That's great! Is it possible to get the&amp;nbsp;same information when I don't have a map loaded?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a page in my application where I don't have a map at all. I just show information from my own custom database that relates to features. I want to be able to open the same custom info panel that I created for use on my map page on this other page. To do that, I need the following information for the feature:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;feature._layer.id&lt;/LI&gt;&lt;LI&gt;feature.geometry&lt;/LI&gt;&lt;LI&gt;feature.geometry.type&lt;/LI&gt;&lt;LI&gt;feature.attributes&lt;/LI&gt;&lt;LI&gt;feature.getLayer().applyEdits&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I&amp;nbsp;looked into using the &lt;A href="https://developers.arcgis.com/rest/services-reference/query-map-service-layer-.htm"&gt;ArcGIS REST API query&lt;/A&gt;, but it doesn't give me any information about the layer or the full geometry object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hoping there is a way to select a feature using its ObjectID &lt;EM&gt;without&lt;/EM&gt; a map. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2019 21:51:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-get-a-graphic-for-feature-without-a-map/m-p/78514#M7138</guid>
      <dc:creator>MattStayner</dc:creator>
      <dc:date>2019-10-14T21:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a graphic for feature without a map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-get-a-graphic-for-feature-without-a-map/m-p/78515#M7139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm pretty sure you can get all the information you want via the Query operation against the REST endpoint. Here I just supplied the OBJECTID and set the outfields to * and returnGeometry to true. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/2/query?where=&amp;amp;text=&amp;amp;objectIds=1&amp;amp;time=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryEnvelope&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;outFields=*&amp;amp;returnGeometry=true&amp;amp;returnTrueCurves=false&amp;amp;maxAllowableOffset=&amp;amp;geometryPrecision=&amp;amp;outSR=&amp;amp;having=&amp;amp;returnIdsOnly=false&amp;amp;returnCountOnly=false&amp;amp;orderByFields=&amp;amp;groupByFieldsForStatistics=&amp;amp;outStatistics=&amp;amp;returnZ=false&amp;amp;returnM=false&amp;amp;gdbVersion=&amp;amp;historicMoment=&amp;amp;returnDistinctValues=false&amp;amp;resultOffset=&amp;amp;resultRecordCount=&amp;amp;queryByDistance=&amp;amp;returnExtentOnly=false&amp;amp;datumTransformation=&amp;amp;parameterValues=&amp;amp;rangeValues=&amp;amp;quantizationParameters=&amp;amp;featureEncoding=esriDefault&amp;amp;f=html"&gt;https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/2/query?where=&amp;amp;text=&amp;amp;objectIds=1&amp;amp;time=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryEnvelope&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;outFields=*&amp;amp;returnGeometry=true&amp;amp;returnTrueCurves=false&amp;amp;maxAllowableOffset=&amp;amp;geometryPrecision=&amp;amp;outSR=&amp;amp;having=&amp;amp;returnIdsOnly=false&amp;amp;returnCountOnly=false&amp;amp;orderByFields=&amp;amp;groupByFieldsForStatistics=&amp;amp;outStatistics=&amp;amp;returnZ=false&amp;amp;returnM=false&amp;amp;gdbVersion=&amp;amp;historicMoment=&amp;amp;returnDistinctValues=false&amp;amp;resultOffset=&amp;amp;resultRecordCount=&amp;amp;queryByDistance=&amp;amp;returnExtentOnly=false&amp;amp;datumTransformation=&amp;amp;parameterValues=&amp;amp;rangeValues=&amp;amp;quantizationParameters=&amp;amp;featureEncoding=esriDefault&amp;amp;f=html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We also have a similar sample that uses the FindTask:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=tasks-find"&gt;https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=tasks-find&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2019 22:53:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-get-a-graphic-for-feature-without-a-map/m-p/78515#M7139</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2019-10-14T22:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a graphic for feature without a map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-get-a-graphic-for-feature-without-a-map/m-p/78516#M7140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just as a side note, if you want it to be a json you can replace the 'f=html' at the end of the url with 'f=pjson' like so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/2/query?where=&amp;amp;text=&amp;amp;objectIds=1&amp;amp;time=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryEnvelope&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;outFields=*&amp;amp;returnGeometry=true&amp;amp;returnTrueCurves=false&amp;amp;maxAllowableOffset=&amp;amp;geometryPrecision=&amp;amp;outSR=&amp;amp;having=&amp;amp;returnIdsOnly=false&amp;amp;returnCountOnly=false&amp;amp;orderByFields=&amp;amp;groupByFieldsForStatistics=&amp;amp;outStatistics=&amp;amp;returnZ=false&amp;amp;returnM=false&amp;amp;gdbVersion=&amp;amp;historicMoment=&amp;amp;returnDistinctValues=false&amp;amp;resultOffset=&amp;amp;resultRecordCount=&amp;amp;queryByDistance=&amp;amp;returnExtentOnly=false&amp;amp;datumTransformation=&amp;amp;parameterValues=&amp;amp;rangeValues=&amp;amp;quantizationParameters=&amp;amp;featureEncoding=esriDefault&amp;amp;f=pjson"&gt;https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/2/query?where=&amp;amp;text=&amp;amp;objectIds=1&amp;amp;time=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryEnvelope&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;outFields=*&amp;amp;returnGeometry=true&amp;amp;returnTrueCurves=false&amp;amp;maxAllowableOffset=&amp;amp;geometryPrecision=&amp;amp;outSR=&amp;amp;having=&amp;amp;returnIdsOnly=false&amp;amp;returnCountOnly=false&amp;amp;orderByFields=&amp;amp;groupByFieldsForStatistics=&amp;amp;outStatistics=&amp;amp;returnZ=false&amp;amp;returnM=false&amp;amp;gdbVersion=&amp;amp;historicMoment=&amp;amp;returnDistinctValues=false&amp;amp;resultOffset=&amp;amp;resultRecordCount=&amp;amp;queryByDistance=&amp;amp;returnExtentOnly=false&amp;amp;datumTransformation=&amp;amp;parameterValues=&amp;amp;rangeValues=&amp;amp;quantizationParameters=&amp;amp;featureEncoding=esriDefault&amp;amp;f=pjson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a sample I created that queries the rest endpoint&amp;nbsp;in JavaScript:&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/benesri/pen/oNNgGXP" title="https://codepen.io/benesri/pen/oNNgGXP"&gt;https://codepen.io/benesri/pen/oNNgGXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I add it to a map, but you can just as easily access the json object instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2019 15:07:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-get-a-graphic-for-feature-without-a-map/m-p/78516#M7140</guid>
      <dc:creator>BenElan</dc:creator>
      <dc:date>2019-10-15T15:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a graphic for feature without a map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-get-a-graphic-for-feature-without-a-map/m-p/78517#M7141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to both of you for your responses. Yes, you can get&amp;nbsp;&lt;EM&gt;some&lt;/EM&gt; information about feature using the REST API, but not nearly as much as you can by selecting the graphic on the map. For example, you can see below, the geometry from the REST Endpoint contains &lt;STRONG&gt;X&lt;/STRONG&gt; and &lt;STRONG&gt;Y&lt;/STRONG&gt;. However, from the Graphic there is much more data including &lt;STRONG&gt;hasM&lt;/STRONG&gt;, &lt;STRONG&gt;hasZ&lt;/STRONG&gt;, &lt;STRONG&gt;latitude&lt;/STRONG&gt;, &lt;STRONG&gt;longitude&lt;/STRONG&gt;, &lt;STRONG&gt;spatialReference&lt;/STRONG&gt;, type, &lt;STRONG&gt;X&lt;/STRONG&gt; and &lt;STRONG&gt;Y&lt;/STRONG&gt;. It's the same things with&amp;nbsp;&lt;STRONG&gt;layer&lt;/STRONG&gt;. I was hoping there was an easy way to get around it, but it sounds like I will still have to go ahead a create a layer and select a feature to get all the same data, even if there isn't a map loaded. Is that right?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/461985_2019-10-15_1603.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2019 22:08:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-get-a-graphic-for-feature-without-a-map/m-p/78517#M7141</guid>
      <dc:creator>MattStayner</dc:creator>
      <dc:date>2019-10-15T22:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a graphic for feature without a map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-get-a-graphic-for-feature-without-a-map/m-p/78518#M7142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create a graphic without having a map.&amp;nbsp;Here&amp;nbsp;is a sample:&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/benesri/pen/XWWKbwK?editors=1000" title="https://codepen.io/benesri/pen/XWWKbwK?editors=1000"&gt;https://codepen.io/benesri/pen/XWWKbwK?editors=1000&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2019 22:20:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-get-a-graphic-for-feature-without-a-map/m-p/78518#M7142</guid>
      <dc:creator>BenElan</dc:creator>
      <dc:date>2019-10-15T22:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a graphic for feature without a map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-get-a-graphic-for-feature-without-a-map/m-p/78519#M7143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe that you can still get all the relevant information from REST. If it's a feature that is hosted somewhere, all the pertinent information is there, it's really just a questions of formatting. For example, the hasM or hasZ is false for both in the image above. This means that there is no M-value or Z-value, so those values will not be returned from the REST endpoint (they would be returned if they existed). The x and y values are just converted lat/longs (or vice versa). The type is available from REST, just in a different format, e.g.:&lt;/P&gt;&lt;PRE style="color: #000000;"&gt;"geometryType": "esriGeometryPolygon",&lt;/PRE&gt;&lt;P&gt;Lastly, the spatial reference is available on the service itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2019 22:23:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-get-a-graphic-for-feature-without-a-map/m-p/78519#M7143</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2019-10-15T22:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get a graphic for feature without a map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-get-a-graphic-for-feature-without-a-map/m-p/78520#M7144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ben and Noah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both great points. Noah, yes it's true, I'm sure it is all there using the REST API, it just would take a little bit of work. Ben, that is what I was looking for. The answer seems obvious now that you point it out. I don't need a map and layers and all that, just a quick query and create a graphic. Perfect! Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2019 14:29:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-i-get-a-graphic-for-feature-without-a-map/m-p/78520#M7144</guid>
      <dc:creator>MattStayner</dc:creator>
      <dc:date>2019-10-16T14:29:18Z</dc:date>
    </item>
  </channel>
</rss>

