<?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: Getting an error when trying to do a query in esri-leaflet in Open Source Mapping Libraries Ques.</title>
    <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774879#M578</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the field is type and the value is NSM. I got that error when I had NSM wrapped in double quotes&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/9832_Capture.JPG" style="width: 620px; height: 80px;" /&gt;&lt;/P&gt;&lt;P&gt;when I type like 'NSM' I get the results as expected.&lt;/P&gt;&lt;P&gt;you can use = too but has to be single quotes around NSM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Sep 2014 19:43:59 GMT</pubDate>
    <dc:creator>PaulCrickard1</dc:creator>
    <dc:date>2014-09-12T19:43:59Z</dc:date>
    <item>
      <title>Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774873#M572</link>
      <description>&lt;P&gt;I am trying to created an app that when you click on a button at the top of the page will display only the countries that will satisfy the query attached to the button (see bottom of the file attached).&lt;/P&gt;
&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the snippet of the code:&lt;/P&gt;
&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$('#NSM').click(function(){&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var buttonType = document.getElementById('NSM');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; countries.setWhere('type="'+ buttonType.value + '"');&lt;/P&gt;
&lt;P&gt;});&lt;/P&gt;
&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using the "querying features #2" as my template.&lt;/P&gt;
&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error I'm getting is&lt;/P&gt;
&lt;P&gt;{"error":{"code":400,"message":"Unable to complete operation.","details":["Attribute column not found [Microsoft SQL Server Native Client 11.0: Invalid column name 'NSM'.] [MEP_global_data.DBO.test_bdry]"]}}&lt;/P&gt;
&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be appreciated&lt;/P&gt;
&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 13:52:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774873#M572</guid>
      <dc:creator>joepublic</dc:creator>
      <dc:date>2023-08-28T13:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774874#M573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the error says you have no field named NSM. Is there a property named NSM in the data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What does the HTML for the button look like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 17:57:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774874#M573</guid>
      <dc:creator>PaulCrickard1</dc:creator>
      <dc:date>2014-09-12T17:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774875#M574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;and the country value is in a field named type? What does the data table look like? what is the field holding the country?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 18:01:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774875#M574</guid>
      <dc:creator>PaulCrickard1</dc:creator>
      <dc:date>2014-09-12T18:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774876#M575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the url&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://dev.consciousglobalchange.org/arcgis/rest/services/MEP/noRelate_tester/FeatureServer/0" rel="nofollow" target="_blank"&gt;http://dev.consciousglobalchange.org/arcgis/rest/services/MEP/noRelate_tester/FeatureServer/0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The column name is "type" the value is NSM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you need any more information&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 18:33:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774876#M575</guid>
      <dc:creator>joepublic</dc:creator>
      <dc:date>2014-09-12T18:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774877#M576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try setWhere(" type like 'nsm' ").&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="userTable" style="font-size: 0.8em; font-family: Verdana, Arial, Helvetica, sans-serif;" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="titlecell" style="padding-bottom: 5px; margin: 0 0 3px; font-weight: bold;"&gt;ArcGIS REST Services Directory&lt;/TD&gt;&lt;TD align="right" style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;A href="http://dev.consciousglobalchange.org/arcgis/rest/login"&gt;Login&lt;/A&gt; | &lt;A href="http://dev.consciousglobalchange.org/arcgis/tokens/"&gt;Get Token&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE class="navTable" style="padding-bottom: 5px; margin: 0 0 3px; border-bottom-color: #000000; border-bottom-width: 1px; border-bottom-style: solid; border-top-color: #000000; border-top-width: 1px; border-top-style: solid; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #e5eff7;" width="100%"&gt;&lt;TBODY&gt;&lt;TR valign="top"&gt;&lt;TD class="breadcrumbs" style="padding: 0 0 5px; font-size: 0.8em; margin: 0 0 3px; font-weight: bold;"&gt;&lt;A href="http://dev.consciousglobalchange.org/arcgis/rest/services"&gt;Home&lt;/A&gt; &amp;gt; &lt;A href="http://dev.consciousglobalchange.org/arcgis/rest/services"&gt;services&lt;/A&gt; &amp;gt; &lt;A href="http://dev.consciousglobalchange.org/arcgis/rest/services/MEP"&gt;MEP&lt;/A&gt; &amp;gt; &lt;A href="http://dev.consciousglobalchange.org/arcgis/rest/services/MEP/noRelate_tester/FeatureServer"&gt;noRelate_tester (FeatureServer)&lt;/A&gt; &amp;gt; &lt;A href="http://dev.consciousglobalchange.org/arcgis/rest/services/MEP/noRelate_tester/FeatureServer/0"&gt;MEP_global_data.DBO.test_bdry&lt;/A&gt; &amp;gt; &lt;A href="http://dev.consciousglobalchange.org/arcgis/rest/services/MEP/noRelate_tester/FeatureServer/0/query"&gt;&lt;EM&gt;query&lt;/EM&gt;&lt;/A&gt;&lt;/TD&gt;&lt;TD align="right" style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;A href="http://dev.consciousglobalchange.org/arcgis/sdk/rest/servicesdirectory.html" target="_blank"&gt;Help&lt;/A&gt; | &lt;A href="http://dev.consciousglobalchange.org/arcgis/rest/services/MEP/noRelate_tester/FeatureServer/0/query?f=help" target="_blank"&gt;API Reference&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;H2 style="font-size: 1.2em; color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;Query: MEP_global_data.DBO.test_bdry (ID: 0)&lt;/H2&gt;&lt;P class="rbody" style="font-size: 0.9em; color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;/P&gt;&lt;FORM name="sdform"&gt;&lt;TABLE class="formTable" style="padding: 5px; margin: 10px 0 3px; border: 1px solid #000000; background-color: #e5eff7;"&gt;&lt;TBODY&gt;&lt;TR valign="top"&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Where:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT name="where" size="75" type="text" value="" /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Object IDs:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT name="objectIds" size="75" type="text" value="" /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Time:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT name="time" size="75" type="text" value="" /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Input Geometry:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;TEXTAREA cols="55" name="geometry" rows="5"&gt;&lt;/TEXTAREA&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Geometry Type:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;SELECT name="geometryType"&gt; &lt;OPTION selected="selected" value="esriGeometryEnvelope"&gt;Envelope&lt;/OPTION&gt; &lt;OPTION value="esriGeometryPoint"&gt;Point&lt;/OPTION&gt; &lt;OPTION value="esriGeometryPolyline"&gt;Polyline&lt;/OPTION&gt; &lt;OPTION value="esriGeometryPolygon"&gt;Polygon&lt;/OPTION&gt; &lt;OPTION value="esriGeometryMultipoint"&gt;Multipoint&lt;/OPTION&gt; &lt;/SELECT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Input Spatial Reference:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT name="inSR" size="75" type="text" value="" /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Spatial Relationship:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;SELECT name="spatialRel"&gt; &lt;OPTION selected="selected" value="esriSpatialRelIntersects"&gt;Intersects&lt;/OPTION&gt; &lt;OPTION value="esriSpatialRelContains"&gt;Contains&lt;/OPTION&gt; &lt;OPTION value="esriSpatialRelCrosses"&gt;Crosses&lt;/OPTION&gt; &lt;OPTION value="esriSpatialRelEnvelopeIntersects"&gt;Envelope Intersects&lt;/OPTION&gt; &lt;OPTION value="esriSpatialRelIndexIntersects"&gt;Index Intersects&lt;/OPTION&gt; &lt;OPTION value="esriSpatialRelOverlaps"&gt;Overlaps&lt;/OPTION&gt; &lt;OPTION value="esriSpatialRelTouches"&gt;Touches&lt;/OPTION&gt; &lt;OPTION value="esriSpatialRelWithin"&gt;Within&lt;/OPTION&gt; &lt;OPTION value="esriSpatialRelRelation"&gt;Relation&lt;/OPTION&gt; &lt;/SELECT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Relation:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT name="relationParam" type="text" value="" /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Out Fields:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT name="outFields" size="75" type="text" value="" /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Return Geometry:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT checked="checked" name="returnGeometry" type="radio" value="" /&gt; True&amp;nbsp;&amp;nbsp; &lt;INPUT name="returnGeometry" type="radio" value="" /&gt; False&lt;/TD&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Max Allowable Offset:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT name="maxAllowableOffset" size="25" type="text" value="" /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Geometry Precision:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT name="geometryPrecision" type="text" value="" /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Output Spatial Reference:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT name="outSR" size="75" type="text" value="" /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Geodatabase Version Name:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT name="gdbVersion" type="text" value="" /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Return IDs Only:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT name="returnIdsOnly" type="radio" value="" /&gt; True&amp;nbsp;&amp;nbsp; &lt;INPUT checked="checked" name="returnIdsOnly" type="radio" value="" /&gt; False&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Return Count Only:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT name="returnCountOnly" type="radio" value="" /&gt; True&amp;nbsp;&amp;nbsp; &lt;INPUT checked="checked" name="returnCountOnly" type="radio" value="" /&gt; False&lt;/TD&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Order By Fields:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT name="orderByFields" type="text" value="" /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Group By Fields (ForStatistics):&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT name="groupByFieldsForStatistics" type="text" value="" /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Output Statistics:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;TEXTAREA cols="50" name="outStatistics" rows="20"&gt;&lt;/TEXTAREA&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;ReturnZ:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT name="returnZ" type="radio" value="" /&gt; True&amp;nbsp;&amp;nbsp; &lt;INPUT checked="checked" name="returnZ" type="radio" value="" /&gt; False&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;ReturnM:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT name="returnM" type="radio" value="" /&gt; True&amp;nbsp;&amp;nbsp; &lt;INPUT checked="checked" name="returnM" type="radio" value="" /&gt; False&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;Format:&lt;/TD&gt;&lt;TD style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;SELECT name="f"&gt; &lt;OPTION value="html"&gt;HTML&lt;/OPTION&gt; &lt;OPTION value="pjson"&gt;JSON&lt;/OPTION&gt; &lt;OPTION value="amf"&gt;AMF&lt;/OPTION&gt; &lt;/SELECT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="left" colspan="2" style="padding-right: 11px; padding-bottom: 5px; font-size: 0.9em; margin: 0 0 3px;"&gt;&lt;INPUT type="submit" value="" /&gt; &lt;INPUT type="submit" value="" /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/FORM&gt;&lt;P&gt;&lt;EM&gt;# records: 6&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;type: &lt;/EM&gt;NSM&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Polygon:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;[-1.05925448094E7, 6331610.610799998] , [-1.05925143079E7, 6337259.6477999985] , [-1.05923596851E7, 6339015.385300003] more... &lt;/P&gt;&lt;P&gt;[-1.74327857678E7, 1.1523017382700004E7] , [-1.74324155192E7, 1.15212753389E7] , [-1.74266945879E7, 1.1507461465899996E7] more... &lt;/P&gt;&lt;P&gt;[-1.70654633969E7, 7965857.698700003] , [-1.70644136541E7, 7967666.887500003] , [-1.70635779787E7, 7968250.298199996] more... &lt;/P&gt;&lt;P&gt;[-1.91074667251E7, 9277683.944799997] , [-1.91073749979E7, 9276497.047700003] , [-1.91068790695E7, 9273703.769900002] more... &lt;/P&gt;&lt;P&gt;[-1.4875929794599999E7, 7612574.983099997] , [-1.4875929794599999E7, 7613688.5315999985] , [-1.4873456720800001E7, 7628072.728600003] more... &lt;/P&gt;&lt;P&gt;[-1.51547280122E7, 8013438.626999997] , [-1.5154136794300001E7, 8014083.521700002] , [-1.51351838718E7, 8009271.293399997] more... &lt;/P&gt;&lt;P&gt;[-1.8491374124E7, 8490460.355300002] , [-1.84912484443E7, 8489146.592200004] , [-1.84870155207E7, 8473950.735399999] more... &lt;/P&gt;&lt;P&gt;[-1.5023646974E7, 8052052.3552] , [-1.5023307227E7, 8053469.133299999] , [-1.5022131804499999E7, 8053527.569499999] more... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 18:59:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774877#M576</guid>
      <dc:creator>PaulCrickard1</dc:creator>
      <dc:date>2014-09-12T18:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774878#M577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;$('#NSM').click(function(){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var buttonType = document.getElementById('NSM');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; countries.setWhere('type like"'+ buttonType.value + '"');&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Didn't work... Got the same error: .... &lt;SPAN style="color: #c41a16; font-family: 'dejavu sans mono', monospace; font-size: 11px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;Invalid column name 'NSM'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It thinks the column name is NSM instead of type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I see in google's developers tool:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL class="expanded children" style="padding: 2px 6px !important; list-style-type: none; color: #303942; font-family: Ubuntu, Arial, sans-serif; font-size: 12px; font-style: normal; font-weight: normal; text-align: start; text-indent: 0px;"&gt;&lt;LI&gt;&lt;SPAN class="header-name" style="color: #545454; margin-right: 0.5em; font-weight: bold;"&gt;geometryType:&lt;/SPAN&gt;&lt;SPAN class="header-value source-code" style="font-family: 'dejavu sans mono', monospace; font-size: 11px !important; margin-right: 100px; margin-top: 1px;"&gt;esriGeometryEnvelope&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="header-name" style="color: #545454; margin-right: 0.5em; font-weight: bold;"&gt;geometry:&lt;/SPAN&gt;&lt;SPAN class="header-value source-code" style="font-family: 'dejavu sans mono', monospace; font-size: 11px !important; margin-right: 100px; margin-top: 1px;"&gt;{"xmin":-180.09,"ymin":11.50500000000001,"xmax":-0.08999999999999009,"ymax":85.95612673286779,"spatialReference":{"wkid":4326}}&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="header-name" style="color: #545454; margin-right: 0.5em; font-weight: bold;"&gt;outFields:&lt;/SPAN&gt;&lt;SPAN class="header-value source-code" style="font-family: 'dejavu sans mono', monospace; font-size: 11px !important; margin-right: 100px; margin-top: 1px;"&gt;*&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="header-name" style="color: #545454; margin-right: 0.5em; font-weight: bold;"&gt;outSR:&lt;/SPAN&gt;&lt;SPAN class="header-value source-code" style="font-family: 'dejavu sans mono', monospace; font-size: 11px !important; margin-right: 100px; margin-top: 1px;"&gt;4326&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="header-name" style="color: #545454; margin-right: 0.5em; font-weight: bold;"&gt;inSR:&lt;/SPAN&gt;&lt;SPAN class="header-value source-code" style="font-family: 'dejavu sans mono', monospace; font-size: 11px !important; margin-right: 100px; margin-top: 1px;"&gt;4326&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="header-name" style="color: #545454; margin-right: 0.5em; font-weight: bold;"&gt;where:&lt;/SPAN&gt;&lt;SPAN class="header-value source-code" style="font-family: 'dejavu sans mono', monospace; font-size: 11px !important; margin-right: 100px; margin-top: 1px;"&gt;type like"NSM"&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="header-name" style="color: #545454; margin-right: 0.5em; font-weight: bold;"&gt;f:&lt;/SPAN&gt;&lt;SPAN class="header-value source-code" style="font-family: 'dejavu sans mono', monospace; font-size: 11px !important; margin-right: 100px; margin-top: 1px;"&gt;json&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 19:19:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774878#M577</guid>
      <dc:creator>joepublic</dc:creator>
      <dc:date>2014-09-12T19:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774879#M578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the field is type and the value is NSM. I got that error when I had NSM wrapped in double quotes&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/9832_Capture.JPG" style="width: 620px; height: 80px;" /&gt;&lt;/P&gt;&lt;P&gt;when I type like 'NSM' I get the results as expected.&lt;/P&gt;&lt;P&gt;you can use = too but has to be single quotes around NSM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 19:43:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774879#M578</guid>
      <dc:creator>PaulCrickard1</dc:creator>
      <dc:date>2014-09-12T19:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774880#M579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;got it.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/10007_Capture.JPG" style="width: 620px; height: 322px;" /&gt;&lt;/P&gt;&lt;P&gt;Here is my code. No Jquery.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;html&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;head&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;title&amp;gt;NSM&amp;lt;/title&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- Load Leaflet from CDN--&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" rel="nofollow" target="_blank"&gt;http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css&lt;/A&gt;&lt;SPAN&gt;" /&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script src="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js" rel="nofollow" target="_blank"&gt;http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- Load Esri Leaflet from CDN --&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script src="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://cdn-geoweb.s3.amazonaws.com/esri-leaflet/0.0.1-beta.5/esri-leaflet.js" rel="nofollow" target="_blank"&gt;http://cdn-geoweb.s3.amazonaws.com/esri-leaflet/0.0.1-beta.5/esri-leaflet.js&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;style&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; html, body,&amp;nbsp; #map {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width : 100%;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; height : 100%;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/style&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;/head&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;body&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;button onclick="NSM()"&amp;gt;NSM&amp;lt;/button&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div id="map"&amp;gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var you;&lt;/P&gt;&lt;P&gt;//var map = L.map('map');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var map = L.map('map').setView([35.10418,-106.62987], 13);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;L.tileLayer('&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;{s}.tile.osm.org/{z}/{x}/{y}.png',{opacity:.4}).addTo(map);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;map.locate({watch:true, setView: false ,maxZoom: 16,enableHighAccuracy:true});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var nsm = new L.esri.FeatureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://dev.consciousglobalchange.org/arcgis/rest/services/MEP/noRelate_tester/FeatureServer/0" rel="nofollow" target="_blank"&gt;http://dev.consciousglobalchange.org/arcgis/rest/services/MEP/noRelate_tester/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var popupTemplate = "&amp;lt;h3&amp;gt;{type}&amp;lt;/h3&amp;gt;";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nsm.bindPopup(function(feature){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return L.Util.template(popupTemplate, feature.properties)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;function NSM(){&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;nsm.setWhere("type like "+ "'NSM'");&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;nsm.addTo(map);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;/body&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 19:58:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774880#M579</guid>
      <dc:creator>PaulCrickard1</dc:creator>
      <dc:date>2014-09-12T19:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774881#M580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the single quotes worked!! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made some changes similar to the code you posted above so that the tilemap is displayed initially.&amp;nbsp; &lt;/P&gt;&lt;P&gt;When you click on the button the countries that satisfy the query are over-layed on the map&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I am getting the following error:&amp;nbsp; &lt;SPAN style="color: #ff0000; font-family: 'dejavu sans mono', monospace; font-size: 11px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;Uncaught TypeError: Cannot read property 'getBounds' of undefined&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-family: 'dejavu sans mono', monospace; font-size: 11px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$('#NSM').click(function(){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var buttonType = document.getElementById('NSM')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; countries.setWhere("type like "+"'"+buttonType.value+"'");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; countries.addTo(map);&amp;nbsp; &lt;SPAN style="color: #ff0000; font-family: 'dejavu sans mono', monospace; font-size: 11px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;&amp;lt;- placing this line here causes the error&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Link to demo: &lt;A href="http://tobagoborn.com/test/query.html" title="http://tobagoborn.com/test/query.html"&gt;Esri Leaflet Demo&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you tell me what I'm doing wrong??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Sep 2014 17:39:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774881#M580</guid>
      <dc:creator>joepublic</dc:creator>
      <dc:date>2014-09-14T17:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774882#M581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got the same error. It was because I was not running the sample on a server, but from my desktop. You have to run the code from a webserver or it will not work. Could that be what is happening when you run it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran it from my server and it worked perfect. Had the countries and when I clicked them they turned red and data was on the right side of screen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 14:29:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774882#M581</guid>
      <dc:creator>PaulCrickard1</dc:creator>
      <dc:date>2014-09-15T14:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774883#M582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmmm...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am running it on a esri webserver installed on an AWS virtual machine.&lt;/P&gt;&lt;P&gt;countries.addTo(map); &lt;SPAN style="color: #ff0000; font-family: 'dejavu sans mono', monospace; font-size: 11px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;&amp;lt;- placed outside the click function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;$('#NSM').click(function(){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var buttonType = document.getElementById('NSM')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; countries.setWhere("type like "+"'"+buttonType.value+"'");&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above "works" but it creates the a layer of ALL the countries BEFORE the setWhere works&lt;/P&gt;&lt;P&gt;see link: &lt;A href="http://tobagoborn.com/test/addmap.html" title="http://tobagoborn.com/test/addmap.html"&gt;Add Map&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I want to create the layer only AFTER you click on the button with the countries that satisfies the query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 15:00:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774883#M582</guid>
      <dc:creator>joepublic</dc:creator>
      <dc:date>2014-09-15T15:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774884#M583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't preload the layer. Load the basemap then add the layer using the where option - NOT the setWhere() method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$('#NSM').click(function()&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; var buttonType = document.getElementById('NSM');&lt;/P&gt;&lt;P&gt;var countries = new L.esri.featureLayer(featureURL, &lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; style: getStyle, &lt;/P&gt;&lt;P&gt;&amp;nbsp; onEachFeature: onEachFeature,&lt;/P&gt;&lt;P&gt;&amp;nbsp; where: "type like"+"'"+buttonType.value+"'"&lt;/P&gt;&lt;P&gt;&amp;nbsp; }).addTo(map);&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you will have lots of buttons, then make a function loadLayer() and pass the buttontype value. then you only need to add the code for the layer once.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 15:14:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774884#M583</guid>
      <dc:creator>PaulCrickard1</dc:creator>
      <dc:date>2014-09-15T15:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774885#M584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Loading the full layer is really slow on my machine. Preloading it is not making setWhere() and faster than if you just load the layer with where option onclick. I think loading using where is faster by a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 15:16:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774885#M584</guid>
      <dc:creator>PaulCrickard1</dc:creator>
      <dc:date>2014-09-15T15:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774886#M585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;Your suggestions worked great!!&lt;/P&gt;&lt;P&gt;The new issue I have is with my mouseout:resetHighlight&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;resetHighlight(e){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; countries.resetStyle(e.target);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is not recognizing the "countries" object since Iam now creating the instance inside of the click function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 16:25:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774886#M585</guid>
      <dc:creator>joepublic</dc:creator>
      <dc:date>2014-09-15T16:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774887#M586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think there is something wrong with the e.target - it is an object and you need to pass and ID to the resetStyle() method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added&lt;/P&gt;&lt;P&gt;&lt;EM&gt;var countries;&lt;/EM&gt; &lt;/P&gt;&lt;P&gt;as the&amp;nbsp; first line after the &amp;lt;script&amp;gt; tag. Delete the var in the onclick button function.&lt;/P&gt;&lt;P&gt;Then where you have resetStyle(), I put this instead:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;countries.setStyle(getStyle());&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works. Code is as simple as ResetStyle() because I am just recalling your original style function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 17:27:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774887#M586</guid>
      <dc:creator>PaulCrickard1</dc:creator>
      <dc:date>2014-09-15T17:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774888#M587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make countries a global variable worked&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do have multiple buttons and what to clear the countries from the&lt;/P&gt;&lt;P&gt;previous button click...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 18:57:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774888#M587</guid>
      <dc:creator>joepublic</dc:creator>
      <dc:date>2014-09-15T18:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774889#M588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use map.removeLayer(). In each buttons function, before you add a layer, check to see if the other layers are on and turn them off if they are. then load your layer for the button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(map.hasLayer(countries)){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.removeLayer(countries);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; countriesABC = new L.esri.featureLayer(featureURL-ABC, &lt;SPAN style="line-height: 1.5;"&gt;{&lt;/SPAN&gt; style: getStyle, &lt;SPAN style="line-height: 1.5;"&gt;onEachFeature: onEachFeature,&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5;"&gt;where: "type&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; like"+"'"+buttonType.value+"'"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }).addTo(map);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;else {alert("aint got it");}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 19:10:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774889#M588</guid>
      <dc:creator>PaulCrickard1</dc:creator>
      <dc:date>2014-09-15T19:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an error when trying to do a query in esri-leaflet</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774890#M589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything looks good!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 19:44:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/getting-an-error-when-trying-to-do-a-query-in-esri/m-p/774890#M589</guid>
      <dc:creator>joepublic</dc:creator>
      <dc:date>2014-09-15T19:44:00Z</dc:date>
    </item>
  </channel>
</rss>

