<?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: ArcGIS  - How to add multiple states to existing map? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-how-to-add-multiple-states-to-existing-map/m-p/578177#M53992</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert&amp;nbsp; Thank you. I was trying something like this but none worked&lt;/P&gt;&lt;P&gt;featureLayer.setDefinitionExpression(&lt;SPAN class="string"&gt;"STATE_NAME = 'New York', 'New Jersey'");&lt;/SPAN&gt;&lt;SPAN class="string"&gt;&lt;/SPAN&gt;&lt;SPAN class="string"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;featureLayer.setDefinitionExpression("STATE_NAME = 'New York'","STATE_NAME = 'New Jersey'");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;featureLayer.setDefinitionExpression("STATE_NAME = 'New York'");; featureLayer.setDefinitionExpression("STATE_NAME = 'New Jersey'")&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;The first options render nothing , the second option rendered on new york ,&amp;nbsp; third option only NJ .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;what is right way to add other states?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;Also, If&amp;nbsp; I try to display for the whole of USA removing the featurelayer, defintion(&lt;/SPAN&gt;&lt;/P&gt;&lt;OL class="dp-c" start="1"&gt;&lt;LI&gt;featureLayer.setDefinitionExpression(&lt;SPAN class="string"&gt;"STATE_NAME = 'New York'");&amp;nbsp; )&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class="string"&gt; it only&amp;nbsp; displays half of the USA. screen grab attached below.&lt;IMG alt="argis-screengrab.jpg" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/36430_argis-screengrab.jpg" style="width: 620px; height: 347px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Dec 2014 22:22:59 GMT</pubDate>
    <dc:creator>kaiserislam</dc:creator>
    <dc:date>2014-12-01T22:22:59Z</dc:date>
    <item>
      <title>ArcGIS  - How to add multiple states to existing map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-how-to-add-multiple-states-to-existing-map/m-p/578174#M53989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am new to ARCGIS. Can someone show me how can I go about adding 2 states New Jersey and Delaware to the existing code? So that it displays along with New York.&lt;/P&gt;&lt;P&gt;Is there also a wild card option to add all the states?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;BR /&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;head&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;!--The viewport meta tag is used to improve the presentation and behavior of the samples &lt;BR /&gt;&amp;nbsp; on iOS devices--&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;title&amp;gt;Class Breaks Renderer&amp;lt;/title&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://js.arcgis.com/3.11/esri/css/esri.css" rel="nofollow" target="_blank"&gt;http://js.arcgis.com/3.11/esri/css/esri.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;style&amp;gt;&lt;BR /&gt;&amp;nbsp; html, body, #map{&lt;BR /&gt;&amp;nbsp; height: 100%;&lt;BR /&gt;&amp;nbsp; margin: 0;&lt;BR /&gt;&amp;nbsp; padding: 0;&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;lt;/style&amp;gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;script src="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://js.arcgis.com/3.11/" rel="nofollow" target="_blank"&gt;http://js.arcgis.com/3.11/&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;script&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; //&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/javascript/jssamples/renderer_class_breaks.html" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/javascript/jssamples/renderer_class_breaks.html&lt;/A&gt;&lt;BR /&gt;&amp;nbsp; var map;&lt;BR /&gt;&amp;nbsp; require([&lt;BR /&gt;&amp;nbsp; "esri/map", "esri/layers/FeatureLayer",&lt;BR /&gt;&amp;nbsp; "esri/InfoTemplate", "esri/symbols/SimpleFillSymbol", &lt;BR /&gt;&amp;nbsp; "esri/renderers/ClassBreaksRenderer",&lt;BR /&gt;&amp;nbsp; "esri/Color", "dojo/dom-style", "dojo/domReady!"&lt;BR /&gt;&amp;nbsp; ], function(&lt;BR /&gt;&amp;nbsp; Map, FeatureLayer,&lt;BR /&gt;&amp;nbsp; InfoTemplate, SimpleFillSymbol, &lt;BR /&gt;&amp;nbsp; ClassBreaksRenderer,&lt;BR /&gt;&amp;nbsp; Color, domStyle&lt;BR /&gt;&amp;nbsp; ) {&lt;BR /&gt;&amp;nbsp; map = new Map("map", {&lt;BR /&gt;&amp;nbsp; basemap: "streets",&lt;BR /&gt;&amp;nbsp; center: [-74.215, 42.382],&lt;BR /&gt;&amp;nbsp; zoom: 7,&lt;BR /&gt;&amp;nbsp; slider: false&lt;BR /&gt;&amp;nbsp; });&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; var symbol = new SimpleFillSymbol();&lt;BR /&gt;&amp;nbsp; symbol.setColor(new Color([150, 150, 150, 0.5]));&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; // Add five breaks to the renderer.&lt;BR /&gt;&amp;nbsp; // If you have ESRI's ArcMap available, this can be a good way to determine break values.&lt;BR /&gt;&amp;nbsp; // You can also copy the RGB values from the color schemes ArcMap applies, or use colors&lt;BR /&gt;&amp;nbsp; // from a site like www.colorbrewer.org&lt;BR /&gt;&amp;nbsp; //&lt;BR /&gt;&amp;nbsp; // alternatively, ArcGIS Server's generate renderer task could be used&lt;BR /&gt;&amp;nbsp; var renderer = new ClassBreaksRenderer(symbol, "POP07_SQMI");&lt;BR /&gt;&amp;nbsp; renderer.addBreak(0, 25, new SimpleFillSymbol().setColor(new Color([56, 168, 0, 0.5])));&lt;BR /&gt;&amp;nbsp; renderer.addBreak(25, 75, new SimpleFillSymbol().setColor(new Color([139, 209, 0, 0.5])));&lt;BR /&gt;&amp;nbsp; renderer.addBreak(75, 175, new SimpleFillSymbol().setColor(new Color([255, 255, 0, 0.5])));&lt;BR /&gt;&amp;nbsp; renderer.addBreak(175, 400, new SimpleFillSymbol().setColor(new Color([255, 128, 0, 0.5])));&lt;BR /&gt;&amp;nbsp; renderer.addBreak(400, Infinity, new SimpleFillSymbol().setColor(new Color([255, 0, 0, 0.5])));&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; var infoTemplate = new InfoTemplate("${NAME}", "${*}");&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; var featureLayer = new FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3" rel="nofollow" target="_blank"&gt;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3&lt;/A&gt;&lt;SPAN&gt;", {&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; mode: FeatureLayer.MODE_SNAPSHOT,&lt;BR /&gt;&amp;nbsp; outFields: ["*"],&lt;BR /&gt;&amp;nbsp; infoTemplate: infoTemplate&lt;BR /&gt;&amp;nbsp; });&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; featureLayer.setDefinitionExpression("STATE_NAME = 'New York'");&lt;BR /&gt;&amp;nbsp; featureLayer.setRenderer(renderer);&lt;BR /&gt;&amp;nbsp; map.addLayer(featureLayer);&lt;BR /&gt;&amp;nbsp; });&lt;BR /&gt;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/head&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;body&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;div id="map"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/body&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 19:22:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-how-to-add-multiple-states-to-existing-map/m-p/578174#M53989</guid>
      <dc:creator>kaiserislam</dc:creator>
      <dc:date>2014-12-01T19:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS  - How to add multiple states to existing map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-how-to-add-multiple-states-to-existing-map/m-p/578175#M53990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kaiser,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If you look at the code there is this line that sets the definition expression for the FeatureLayer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14174621114068003 jive_text_macro" jivemacro_uid="_14174621114068003"&gt;&lt;CODE&gt;featureLayer.setDefinitionExpression("STATE_NAME = 'New York'");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to adjust this line to add the other states you are interested in, or remove this line if you want all states.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 19:29:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-how-to-add-multiple-states-to-existing-map/m-p/578175#M53990</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-12-01T19:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS  - How to add multiple states to existing map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-how-to-add-multiple-states-to-existing-map/m-p/578176#M53991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kaiser,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; By the way you will notice that I have moved your thread from the GeoNet Help space to the &lt;A href="https://community.esri.com/space/2128"&gt;ArcGIS API for JavaScript&lt;/A&gt;‌ space. It is important to post questions in the correct spaces.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 19:33:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-how-to-add-multiple-states-to-existing-map/m-p/578176#M53991</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-12-01T19:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS  - How to add multiple states to existing map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-how-to-add-multiple-states-to-existing-map/m-p/578177#M53992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert&amp;nbsp; Thank you. I was trying something like this but none worked&lt;/P&gt;&lt;P&gt;featureLayer.setDefinitionExpression(&lt;SPAN class="string"&gt;"STATE_NAME = 'New York', 'New Jersey'");&lt;/SPAN&gt;&lt;SPAN class="string"&gt;&lt;/SPAN&gt;&lt;SPAN class="string"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;featureLayer.setDefinitionExpression("STATE_NAME = 'New York'","STATE_NAME = 'New Jersey'");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;featureLayer.setDefinitionExpression("STATE_NAME = 'New York'");; featureLayer.setDefinitionExpression("STATE_NAME = 'New Jersey'")&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;The first options render nothing , the second option rendered on new york ,&amp;nbsp; third option only NJ .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;what is right way to add other states?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;Also, If&amp;nbsp; I try to display for the whole of USA removing the featurelayer, defintion(&lt;/SPAN&gt;&lt;/P&gt;&lt;OL class="dp-c" start="1"&gt;&lt;LI&gt;featureLayer.setDefinitionExpression(&lt;SPAN class="string"&gt;"STATE_NAME = 'New York'");&amp;nbsp; )&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class="string"&gt; it only&amp;nbsp; displays half of the USA. screen grab attached below.&lt;IMG alt="argis-screengrab.jpg" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/36430_argis-screengrab.jpg" style="width: 620px; height: 347px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 22:22:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-how-to-add-multiple-states-to-existing-map/m-p/578177#M53992</guid>
      <dc:creator>kaiserislam</dc:creator>
      <dc:date>2014-12-01T22:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS  - How to add multiple states to existing map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-how-to-add-multiple-states-to-existing-map/m-p/578178#M53993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kaiser,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; OK, so you need some basic SQL syntax help then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;featureLayer.setDefinitionExpression(&lt;SPAN class="string"&gt;"STATE_NAME IN( 'New York', 'New Jersey', 'Delaware')");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="string"&gt;The reason that removing the DefinitionExpression does not work is you are likely reaching the Map Services max feature output.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 22:28:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-how-to-add-multiple-states-to-existing-map/m-p/578178#M53993</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-12-01T22:28:14Z</dc:date>
    </item>
  </channel>
</rss>

