<?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 Set layer definition on Webmap through URL? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-layer-definition-on-webmap-through-url/m-p/370338#M34348</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My question is that is it possible to set a layer definition on a Webmap through the URL?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I am essentially trying to do is I am building an app that has a profile page with a link to an AGOL webmap.&amp;nbsp; When the user clicks the link I would not only like to be able to take them to a webmap but also set a layer definition on the layer in the webmap. Each profile page is for a specific district and there are tons of districts over the whole country, can I link them to the webmap and pass in a definition expression, say something like 'DistrictId = 240042' and have that set on the map on load.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Feb 2013 19:05:05 GMT</pubDate>
    <dc:creator>RobertWinterbottom</dc:creator>
    <dc:date>2013-02-01T19:05:05Z</dc:date>
    <item>
      <title>Set layer definition on Webmap through URL?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-layer-definition-on-webmap-through-url/m-p/370338#M34348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My question is that is it possible to set a layer definition on a Webmap through the URL?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I am essentially trying to do is I am building an app that has a profile page with a link to an AGOL webmap.&amp;nbsp; When the user clicks the link I would not only like to be able to take them to a webmap but also set a layer definition on the layer in the webmap. Each profile page is for a specific district and there are tons of districts over the whole country, can I link them to the webmap and pass in a definition expression, say something like 'DistrictId = 240042' and have that set on the map on load.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 19:05:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-layer-definition-on-webmap-through-url/m-p/370338#M34348</guid>
      <dc:creator>RobertWinterbottom</dc:creator>
      <dc:date>2013-02-01T19:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set layer definition on Webmap through URL?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-layer-definition-on-webmap-through-url/m-p/370339#M34349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;have you seen Sonia's code sample in &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/76708-Returning-a-text-value-from-a-spatial-query"&gt;this&lt;/A&gt;&lt;SPAN&gt; forum post?&amp;nbsp; it allows her to fire a spatial query by appending X and Y coordinates to the Url of her app.&amp;nbsp; perhaps you could modify it to use similar information to create a definition query on your layer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 19:38:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-layer-definition-on-webmap-through-url/m-p/370339#M34349</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2013-02-01T19:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set layer definition on Webmap through URL?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-layer-definition-on-webmap-through-url/m-p/370340#M34350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the response, How would I get access to the layer though to apply the layer definition?&amp;nbsp; If it were for the map in my app I think this would be very easy but because it is a webmap on an AGOL account I don't have access to the layer(atleast not that I know of).&amp;nbsp; I am just giving my user an &amp;lt;a&amp;gt; tag with the link to the webmap to open it in a new page.&amp;nbsp; I was hoping to be able to have it open with a particular definition set on it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 19:50:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-layer-definition-on-webmap-through-url/m-p/370340#M34350</guid>
      <dc:creator>RobertWinterbottom</dc:creator>
      <dc:date>2013-02-01T19:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set layer definition on Webmap through URL?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-layer-definition-on-webmap-through-url/m-p/370341#M34351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;you can definitely dig into the layers in the web map in an application written with our API.&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/ags_createwebmapid" rel="nofollow" target="_blank"&gt;this sample&lt;/A&gt;&lt;SPAN&gt; loops through the webmap layers to add them to a legend.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it sounds however like you are currently sharing a link to open the original web map (perhaps in the standard arcgis.com viewer?).&amp;nbsp; in order to build out the functionality you describe you would need to be linking to a configurable web application (that loads a web map based on its id) and similarly pulls additional information out of the Url to write a definition query on the fly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 19:58:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-layer-definition-on-webmap-through-url/m-p/370341#M34351</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2013-02-01T19:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set layer definition on Webmap through URL?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-layer-definition-on-webmap-through-url/m-p/370342#M34352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;you can definitely dig into the layers in the web map in an application written with our API.&amp;nbsp; &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/ags_createwebmapid"&gt;this sample&lt;/A&gt; loops through the webmap layers to add them to a legend.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks I have done this a few times, the API makes it pretty simple.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;it sounds however like you are currently sharing a link to open the original web map (perhaps in the standard arcgis.com viewer?).&amp;nbsp; in order to build out the functionality you describe you would need to be linking to a configurable web application (that loads a web map based on its id) and similarly pulls additional information out of the Url to write a definition query on the fly.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But this is exactly what I was going for.&amp;nbsp; The webmap is currently living on the standard viewer.&amp;nbsp; I think my project manager would prefer I do this through the standard AGOL viewer but it sounds like at this time that is not possible. I will suggest this as an alternative to her as this would be fairly simple to build and see if it's something we can do.&amp;nbsp; Thanks a lot, I appreciate the response.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 20:16:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-layer-definition-on-webmap-through-url/m-p/370342#M34352</guid>
      <dc:creator>RobertWinterbottom</dc:creator>
      <dc:date>2013-02-01T20:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set layer definition on Webmap through URL?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-layer-definition-on-webmap-through-url/m-p/370343#M34353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;no problem at all.&amp;nbsp; i see people share links to open web maps directly in the arcgis.com viewer quite a bit.&amp;nbsp; my perception is that it adds quite a bit of unnecessary background noise for a lot of end users.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;a clean, simple web mapping application is a much better way to present the web map.&amp;nbsp; and if it adds some logic to build a definition query on the fly, all the better &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 20:19:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-layer-definition-on-webmap-through-url/m-p/370343#M34353</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2013-02-01T20:19:22Z</dc:date>
    </item>
  </channel>
</rss>

