I have a esri-leaftlet app that works when I use a cloudfront base (tile) map but I get errors when I change to a Stamen base map.
(See link below)
ICGC WEB PORTAL ....
When I click on a button to see the first (News) button, I get the following error:
Uncaught TypeError: Cannot read property 'trim' of undefined
o.Util.trim @ leaflet.js:5
cleanUrl @ Util.js:387
exports.Task.L.Class.extend.initialize @ Task.js:28
o.Class.extend.e @ leaflet.js:5
query @ Query.js:229
(anonymous function) @ icgcWebMap5.html:261
n.event.dispatch @ jquery.js:4435
n.event.add.r.handle @ jquery.js:4121
And if I click on any of the other buttons, I get the following error:
Uncaught TypeError: Cannot read property 'query' of undefined
(anonymous function) @ icgcWebMap5.html:329
n.event.dispatch @ jquery.js:4435
n.event.add.r.handle @ jquery.js:4121
I at a total loss as to why this is happening. Any help would much appreciated
Thanks
Chris
Solved! Go to Solution.
please reread my response to your previous geonet post, as you encountering the exact same problem.
you are still passing the url of the service you'd like to query as a plain string to L.esri.Query(), rather than within the options object which is currently required.
var query = L.esri.query(tableURL).where("type like '" + buttonType.value + "'"); // at line 257 needs to be var query = L.esri.query( { url: tableURL } ).where("type like '" + buttonType.value + "'");
Hey John,
My bad!! I was using an old version of my app
Thanks
Chris