I'm tring to update an app I created with esri-leaflet and esri-leaflet-related.
Based on what I've read in the notes on the releases for both esri-leaflet and esri-leaft-related.
I've updated my app to point to the cdn versions of (see below):
leaflet: version 0.7.3
esri-leaflet: version 1.0..0
esri-leatlet-related: version 1.0.2
<script src="//cdn.jsdelivr.net/leaflet/0.7.3/leaflet.js"></script>
<script src="//cdn.jsdelivr.net/leaflet.esri/1.0.0/esri-leaflet.js"></script>
<script src="//cdn.jsdelivr.net/leaflet.esri.related/1.0.2/esri-leaflet-related.js"></script>
but I am getting the following error:
TypeError: a is undefined
http://cdn.jsdelivr.net/leaflet.esri/1.0.0/esri-leaflet.js
Line 20
Note: I'm clicking on a button that triggers following (partial script):
$('#NSM').click(function(){
buttonPicked = 'NSM';
buttonType = document.getElementById('NSM');
var query = L.esri.Tasks.query(tableURL).where("type like '" + buttonType.value + "'");
var rquery = L.esri.Tasks.queryRelated(tableURL).relationshipId("0");
query.ids(function(error, ids, response)
{ ......
any ideas as to what's happening would be appreciated
Regards
Chris
P.S Please let me know if need to a copy of my script uploaded
Solved! Go to Solution.
as explained in the esri-leaflet 1.0.0 release notes, we introduced the breaking change that tasks and layers constructors now expect the url of the corresponding resource to be provided within an options object
L.esri.Tasks.query(yourUrl) // becomes L.esri.Tasks.query({ url: yourUrl })
the API reference for L.esri.Tasks.query reflects this change as well.
you can find information about an equivalent change in the release notes for esri-leaflet-related 0.0.1-beta.2.
as explained in the esri-leaflet 1.0.0 release notes, we introduced the breaking change that tasks and layers constructors now expect the url of the corresponding resource to be provided within an options object
L.esri.Tasks.query(yourUrl) // becomes L.esri.Tasks.query({ url: yourUrl })
the API reference for L.esri.Tasks.query reflects this change as well.
you can find information about an equivalent change in the release notes for esri-leaflet-related 0.0.1-beta.2.
Thanks John!!
I re-read the documentation after reading your reply and everything is working again
Chris