Changing base (tile) map

5194
2
Jump to solution
09-12-2015 05:09 PM
Labels (1)
joepublic
New Contributor III

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

0 Kudos
1 Solution

Accepted Solutions
joepublic
New Contributor III

Hey John,

My bad!! I was using an old version of my app

Thanks

Chris

View solution in original post

0 Kudos
2 Replies
JohnGravois
Frequent Contributor

please reread my response to your previous geonet post, as you encountering the exact same problem.

Updating an esri-leaftlet app

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 + "'");
0 Kudos
joepublic
New Contributor III

Hey John,

My bad!! I was using an old version of my app

Thanks

Chris

0 Kudos