I have a website that is displaying a MapBox map, using Leaflet. One of the layers is generated from an Esri ArcGIS Rest interface, using Esri's Leaflet plugin: https://esri.github.io/esri-leaflet/
My current task is to allow the user to click on the map, and then to display information for nearby features in the ArcGIS layer. From reading the docs, Esri's L.esri.query object should be able to manage this.
My problem? L.esri.query is undefined.
Initially, I'd just been loading the v1.0 JS file:
When that didn't work, I tried loading the v2.0 JS file:
And when that didn't work, I included every plugin listed at https://esri.github.io/esri-leaflet/download/:
<script src="https://cdn.jsdelivr.net/leaflet.esri.clustered-feature-layer/2.0.0-beta.1/esri-leaflet-clustered-feature-layer.js"></script> <link rel="stylesheet" href="https://cdn.jsdelivr.net/leaflet.esri.geocoder/2.0.2/esri-leaflet-geocoder.css"> <script src="https://cdn.jsdelivr.net/leaflet.esri.geocoder/2.0.2/esri-leaflet-geocoder.js"></script> <script src="https://cdn.jsdelivr.net/leaflet.esri.renderers/2.0.1/esri-leaflet-renderers.js"></script> <script src="https://cdn.jsdelivr.net/leaflet.esri.gp/2.0.2/esri-leaflet-gp.js"></script>
And still, nothing. So, the question, where is L.esri.query() defined?