Closed kjrhody closed 5 years ago
This may be the same as #225
@kjrhody are you able to post the full code of your JS that causes this error? Then we can check to see if the fix for #225 will resolve your issue or if it's separate. Thanks!
I think you're right and it is the same issue - when I go to that line in the Geosearch.js it looks like the providers length is what is causing the problem:
for (var i = 0; i < this.options.providers.length; i++) {
this.options.providers[i]._contentsElement = DomUtil.create('div', null, this._suggestions);
}
I can't post the whole thing unfortunately but I don't think we need to now!
The code update (2.3.0 on 10/10/19) appears to have broken the ability for our map to add the search control. We had it implemented as the following:
let searchControl = L.esri.Geocoding.geosearch().addTo(map);
It returned the following error:
I then changed it to:
let searchControl = L.esri.Geocoding.Geosearch().addTo(map);
per the documentation here: https://esri.github.io/esri-leaflet/api-reference/controls/geosearch.htmlAnd that returns the following error:
Last week we adjusted the bounds of our map, so I'm not sure if that could be the issue, but I don't think so? I tried this just in case, but it returns the same error as directly above.
let searchControl = L.esri.Geocoding.Geosearch({useMapBounds: true}).addTo(map);
Thanks for any help.