-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple magic keys for provider L.esri.Geocoding.mapServiceProvider not geocoding correctly #250
Comments
Reproduction steps:
I am unsure at this time what the next steps are to go about fixing this situation. Ideas and comments welcome. For example, do we list "Fayette Detailed Counties" multiple times in the DOM with only 1 magic key each? Other ideas? |
this looks to be a bug i introduced in #151 when the geocoding control aggregates more than one match behind a single suggestion.
no. IMHO a single result should appear in the list of suggestions and the control should return all matching features in the event it emits when a geocode is executed. to accomplish this, you could:
f$%k all that noise though, it'd be a lot easier and probably work just fine to just trigger the // if more than one result is present, use find()
if (key && !key.includes(',')) {
} else {
request = this.find().text(text).fields(this.options.searchFields).layers(this.options.layers);
} you'll have to test with |
Thanks for the background info and ideas, @jgravois! I had a moment to give the latter idea a spin and it checks out nicely. Here's the mapped result without any errors for "Fayette". I'll try to give this more time and thoroughly test it out (and also double-check with the FL provider) in the coming days. |
FL providers queries correctly when there are more than 1 keys available. Added comments and tests. |
In our
/debug/sample.html
and in the public docs example that uses amapServiceProvider
with the geocoder, an error is encountered when trying to query for the suggested result a user has chosen.TypeError: features is undefined
.Somehow invalid numbers are getting added into the query URL structure, thus the query request doesn't happen and it is just returning an info json response.
http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/2,2932/query?returnGeometry=true&where=1%3D1&outSR=4326&outFields=*&objectIds=2346&f=json
Note specifically this part:
...MapServer/2,2932/query...
.Here is a screenshot for some stack tracing.
The text was updated successfully, but these errors were encountered: