-
-
Notifications
You must be signed in to change notification settings - Fork 393
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update HERE API autocomplete #11507
Update HERE API autocomplete #11507
Conversation
@sinaeftekhar Can you take care of the failing specs? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that we also need to change the format here:
decidim/decidim-core/app/packs/src/decidim/geocoding/provider/here.js
Lines 15 to 21 in 9ccf9a5
["street", "houseNumber"], | |
"district", | |
"city", | |
"county", | |
"state", | |
"country" | |
]; |
Some of the keys in the format have changed (review them):
https://developer.here.com/documentation/geocoding-search-api/api-reference-swagger.html
@sinaeftekhar whenever you have the time, can you check this out? As its an API deprecation, we want to add this to v0.28 and (probably) also backport this so its available to older versions. Don't hesitate in letting us know if you don't have the time as we can retake this with the Decidim Association resources. Thanks! |
Dear @andreslucena |
I have created a new application in platform.here.com, and tried the API key in a Decidim / develop branch. Using that application, I got an error while using the key. Switching to this branch, using the same config I could load the map and I was able to partially geolocate my address from admin. There is a problem with the geolocation part, and that is the Address dropdown is not always being shown, especially when searching with missing diacritics. (extracted to #11760) When searching for Strada 脦nving , the request and dropdown works as expected : API Request is : GET | https://autocomplete.search.hereapi.com/v1/autocomplete?apiKey=MY_API_KEY&q=Strada 脦nving&lang=en Api response``` { "items":[ { "title":"Romania, Bucharest, Strada 脦nving膬torilor", "id":"here:af:street:AyzaPMHKHgM.Sj9jm-wB7C", "language":"en", "resultType":"street", "address":{ "label":"Strada 脦nving膬torilor, Bucharest, Romania", "countryCode":"ROU", "countryName":"Romania", "county":"Bucharest", "city":"Bucharest", "district":"Sectorul 3", "street":"Strada 脦nving膬torilor" }, "highlights":{ "title":[ { "start":20, "end":33 } ], "address":{ "label":[ { "start":0, "end":13 } ], "street":[ { "start":0, "end":13 } ] } } }, { "title":"Romania, Bragadiru, Strada 脦nving膬torilor", "id":"here:af:street:FdoEZ.A-bTJ8QWsaXOuZSC", "language":"en", "resultType":"street", "address":{ "label":"Strada 脦nving膬torilor, 077025 Bragadiru, Romania", "countryCode":"ROU", "countryName":"Romania", "county":"Ilfov", "city":"Bragadiru", "district":"Bragadiru", "street":"Strada 脦nving膬torilor", "postalCode":"077025" }, "highlights":{ "title":[ { "start":20, "end":33 } ], "address":{ "label":[ { "start":0, "end":13 } ], "street":[ { "start":0, "end":13 } ] } } }, { "title":"Romania, Glina, Strada 脦nving膬torilor", "id":"here:af:street:ACyLZwPy4O-h6CixNY8.LA", "language":"en", "resultType":"street", "address":{ "label":"Strada 脦nving膬torilor, 077105 Glina, Romania", "countryCode":"ROU", "countryName":"Romania", "county":"Ilfov", "city":"Glina", "street":"Strada 脦nving膬torilor", "postalCode":"077105" }, "highlights":{ "title":[ { "start":16, "end":29 } ], "address":{ "label":[ { "start":0, "end":13 } ], "street":[ { "start":0, "end":13 } ] } } } ] } ```This does not work: GET | https://autocomplete.search.hereapi.com/v1/autocomplete?apiKey=MY_API_KEY&q=Strada Inving&lang=en Api response``` { "items":[ { "title":"Romania, Bucharest, Strada 脦nving膬torilor", "id":"here:af:street:AyzaPMHKHgM.Sj9jm-wB7C", "language":"en", "resultType":"street", "address":{ "label":"Strada 脦nving膬torilor, Bucharest, Romania", "countryCode":"ROU", "countryName":"Romania", "county":"Bucharest", "city":"Bucharest", "district":"Sectorul 3", "street":"Strada 脦nving膬torilor" }, "highlights":{ "title":[ { "start":20, "end":33 } ], "address":{ "label":[ { "start":0, "end":13 } ], "street":[ { "start":0, "end":13 } ] } } }, { "title":"Romania, Bragadiru, Strada 脦nving膬torilor", "id":"here:af:street:FdoEZ.A-bTJ8QWsaXOuZSC", "language":"en", "resultType":"street", "address":{ "label":"Strada 脦nving膬torilor, 077025 Bragadiru, Romania", "countryCode":"ROU", "countryName":"Romania", "county":"Ilfov", "city":"Bragadiru", "district":"Bragadiru", "street":"Strada 脦nving膬torilor", "postalCode":"077025" }, "highlights":{ "title":[ { "start":20, "end":33 } ], "address":{ "label":[ { "start":0, "end":13 } ], "street":[ { "start":0, "end":13 } ] } } }, { "title":"Romania, Glina, Strada 脦nving膬torilor", "id":"here:af:street:ACyLZwPy4O-h6CixNY8.LA", "language":"en", "resultType":"street", "address":{ "label":"Strada 脦nving膬torilor, 077105 Glina, Romania", "countryCode":"ROU", "countryName":"Romania", "county":"Ilfov", "city":"Glina", "street":"Strada 脦nving膬torilor", "postalCode":"077105" }, "highlights":{ "title":[ { "start":16, "end":29 } ], "address":{ "label":[ { "start":0, "end":13 } ], "street":[ { "start":0, "end":13 } ] } } } ] } ```Some other addresses that do not work if there is no :
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
the other issue i was commented about was fixed in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've checked it out locally and it works. I labeled as type: fix
so we can backport it.
The label fix (mentioned above) wasn't done in this so it means the country name won't show up in the results. |
* Update here api autocomplete * Fix linting errors and a failing tests
* develop: (30 commits) Add `process-content` to erb-lint's deprecated classes (#11762) Add possibility of overriding the tailwind.config.js (#11763) Ask old password when changing email or password (#11737) Add Projects (Budgets) to filtered search (#11740) Fix missing results on Geocoded when search without diacritics (#11761) Add robots.txt instructions (#11693) Add missing activerecord budget locales for search (#11766) Improve design of Admin's Sidebar pages (#11759) Show small static map on admin's meetings index with big screens (#11715) Remove "Manage" button when there's a Sidebar (#11717) Fix admin breadcrumb in Process (#11757) Apply new rubocop rules on erb - Layout/MultilineMethodCallIndentation (#11756) Remove xlarge-* references from admin forms (#11712) Apply new rubocop rules on erb - Argument identation (#11707) Update HERE API autocomplete (#11507) Admin redesign proposal issues (#11668) Redesign: responsive links on cards (#11538) Refactor CI pipelines (#11196) Update postcss and graphql to latest versions (#11733) Fix develop pipeline (#11750) ...
Current version of api being used by decidim(6.2) is going to be deprecated soon(December 31st, 2023 according to their website). Already new api keys wont be supported for the older versions.
馃搶 Related Issues
Link your PR to an issue