<?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: Querying feature info for L.esri.dynamicMapLayer “bbox must be specified” in Open Source Mapping Libraries Ques.</title>
    <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/querying-feature-info-for-l-esri-dynamicmaplayer/m-p/863803#M461</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I pass a LatLng object, I receive a "bbox must be specified" error. Any ideas as to what I should look at?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Mar 2016 17:12:57 GMT</pubDate>
    <dc:creator>JeffreyDege</dc:creator>
    <dc:date>2016-03-07T17:12:57Z</dc:date>
    <item>
      <title>Querying feature info for L.esri.dynamicMapLayer “bbox must be specified”</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/querying-feature-info-for-l-esri-dynamicmaplayer/m-p/863801#M459</link>
      <description>&lt;P style="margin-bottom: 1em; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;"&gt;I have a Leaflet map in which I am displaying an Esri ArcGIS REST layer, using L.esri.dynamicMapLayer(). The code that initializes this layer is passed the URL to the service and a comma-separated list of layers to be displayed - which service and which layers is configured by the user.&lt;/P&gt;
&lt;P style="margin-bottom: 1em; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;"&gt;My task is to provide a means by which the user can click on the map and obtain feature information for the nearby facilities. I had been looking at L.esri.query(), which was simply inappropriate.&lt;/P&gt;
&lt;P style="margin-bottom: 1em; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;"&gt;Looking at L.esri.DynamicMapLayer, I see that it has a function identify(), which should return an IdentifyFeatures object. But I'm not having any luck with using it.&lt;/P&gt;
&lt;P style="margin-bottom: 1em; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;"&gt;Everything I try results in a "bbox must be specified" error.&lt;/P&gt;
&lt;P style="margin-bottom: 1em; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;"&gt;The documentation for dynamicMapLayer is here: &lt;A style="color: #005999;" href="https://esri.github.io/esri-leaflet/api-reference/layers/dynamic-map-layer.html" target="_blank" rel="nofollow noopener noreferrer"&gt;dynamic-map-layer.html&lt;/A&gt;​&lt;/P&gt;
&lt;P style="margin-bottom: 1em; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;"&gt;It includes:&lt;/P&gt;
&lt;BLOCKQUOTE class="jive-quote" style="padding-right: 10px; padding-left: 10px; border-left-color: #ffeb8e; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; background-color: #fff8dc;"&gt;
&lt;P&gt;Returns a new L.esri.services.IdentifyFeatures object that can be used to identify features on this layer. Your callback function will be passed a GeoJSON FeatureCollection with the results or an error.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;PRE class="lia-code-sample line-numbers language-none" tabindex="0"&gt;&lt;CODE&gt;dynamicMapLayer.identify() 
.at(latlng, latlngbounds, 5) 
.run(function(error, featureCollection)
{ 
    console.log(featureCollection); 
}); &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P style="margin-bottom: 1em; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;"&gt;Note that .at() is called with a latlong object, a latlngbounds object, and "5".&lt;/P&gt;
&lt;P style="margin-bottom: 1em; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;"&gt;But the documentation for the IdentifyFeatures object is here: &lt;A style="color: #005999;" href="https://esri.github.io/esri-leaflet//api-reference/tasks/identify-features.html" target="_blank" rel="nofollow noopener noreferrer"&gt;identify-features.html&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 1em; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;"&gt;And it's documentation for at() is:&lt;/P&gt;
&lt;BLOCKQUOTE class="jive-quote" style="padding-right: 10px; padding-left: 10px; border-left-color: #ffeb8e; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; background-color: #fff8dc;"&gt;
&lt;P&gt;at( latlng) this Identifies feautres at a given&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P style="margin-bottom: 1em; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;"&gt;Only one argument. No second bounds argument, or third numeric argument, simply a LatLng. The LatLng links to the Leaflet code, indicating that it's an L.latLng object, containing a lat and a lng property.&lt;/P&gt;
&lt;P style="margin-bottom: 1em; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;"&gt;The example code for IdentifyFeatures is even more confusing:&lt;/P&gt;
&lt;PRE class="lia-code-sample line-numbers language-none" tabindex="0"&gt;&lt;CODE&gt;L.esri.identifyFeatures({ 
    url: 'http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer' 
}) 
.on(map) 
.at([45.543, -122.621]) 
.layers('visible:1') 
.run(function(error, featureCollection, response){ 
    console.log("UTC Offset: " + featureCollection.features[0].properties.ZONE); 
}); 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P style="margin-bottom: 1em; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;"&gt;Here, we're not passing a L.latLng object, we're passing an array.&lt;/P&gt;
&lt;P style="margin-bottom: 1em; color: #222426; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;"&gt;What gives? How am I supposed to use this?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 13:29:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/querying-feature-info-for-l-esri-dynamicmaplayer/m-p/863801#M459</guid>
      <dc:creator>JeffreyDege</dc:creator>
      <dc:date>2023-08-28T13:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Querying feature info for L.esri.dynamicMapLayer “bbox must be specified”</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/querying-feature-info-for-l-esri-dynamicmaplayer/m-p/863802#M460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i answered this question on gis.se.&lt;/P&gt;&lt;P&gt;&lt;A href="http://gis.stackexchange.com/a/183388/21012" title="http://gis.stackexchange.com/a/183388/21012"&gt;leaflet - Querying feature info for L.esri.dynamicMapLayer "bbox must be specified" - Geographic Information Systems Sta…&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you still have questions after reviewing my response, i'd be happy to review a jsbin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2016 05:49:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/querying-feature-info-for-l-esri-dynamicmaplayer/m-p/863802#M460</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2016-03-04T05:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Querying feature info for L.esri.dynamicMapLayer “bbox must be specified”</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/querying-feature-info-for-l-esri-dynamicmaplayer/m-p/863803#M461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I pass a LatLng object, I receive a "bbox must be specified" error. Any ideas as to what I should look at?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Mar 2016 17:12:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/querying-feature-info-for-l-esri-dynamicmaplayer/m-p/863803#M461</guid>
      <dc:creator>JeffreyDege</dc:creator>
      <dc:date>2016-03-07T17:12:57Z</dc:date>
    </item>
  </channel>
</rss>

