Skip to content
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

Teachers want Accents to work when searching for cities in OpenStreetMap #662

Closed
holta opened this issue Jan 29, 2018 · 14 comments
Closed
Labels
Milestone

Comments

@holta
Copy link
Member

holta commented Jan 29, 2018

See @georgejhunt's heroic fix @ #659 that goes 90% of the way, but leaves teachers frustrated when their city shows up (autocomplete works!) but something about the geo-location fails, such that a map of their city never appears.

This is based on the 10.7GB National Geographic tiles from http://dev.worldpossible.org/cgi/viewmod.pl?module_id=100

@holta holta added the bug label Jan 29, 2018
@holta holta added this to the 6.5 milestone Jan 29, 2018
@holta holta changed the title Teacher want Accents to work when searching for cities in OpenStreetMap Teachers want Accents to work when searching for cities in OpenStreetMap Jan 29, 2018
@tim-moody
Copy link
Contributor

if this is a bug it is at source. remember that the search db only has the 5000 largest cities in the world.

I don't see that auto complete works on iiab.me. try León. maybe no accents in db. oaxaca search returns full name with an accent that fails to match to a map. just entering oaxaca goes to the map.

@holta
Copy link
Member Author

holta commented Jan 30, 2018

Autocomplete works at iiab.me/modules/en-worldmap/map.html if you enter "Acap" or "acap"

Observe the 3 autocomplete results — some of which are clickable — but not Acapulco, as its full name contains accent(s).

This is an upstream bug no doubt, but universally requested by teachers in different states in Mexico.

(Let's also consider upgrading from 5000 cities to 15,000 cities — which Mexican schools would appreciate greatly if it's doable!)

@tim-moody
Copy link
Contributor

the original iiab maps does know the difference between León and Leon

@tim-moody
Copy link
Contributor

sqlite> select * from features where name like 'oaxaca%';
3522507|Oaxaca de Juárez|Oaxaca de Juarez|Byen Oaxaca,Guaxaca,Huaxyacac Juarez,Huaxyacac Juárez,Lungsod ng Oaxaca,OAX,Oachaka,Oachaka nte Chouares,Oahaka,Oakhaka,Oakhaka de Khuares,Oakhaka-de-Khuares,Oakhakae-de-Khuares,Oaksaka de Khuarez,Oaxaca,Oaxaca City,Oaxaca by,Oaxaca de Juarez,Oaxaca de Juárez,Oaxaka de Juarez,Oaxaka de Juárez,Oaxaka de Xuares,Santa Maria,awakhaka d khwarz,awkhaka,oagsaka,oahaka,vahaka de ju'ereza,vahaka de khu'arisa,vasaka de hu'arejha,wa ha ka,wa ha ka shi,Οαχάκα ντε Χουάρες,Оаксака де Хуарез,Оахакæ-де-Хуарес,Оахака,Оахака де Хуарес,Оахака-де-Хуарес,Օախակա դե Խուարես,אואחאקה,أوخاكا,اوآخاکا د خوارز,اوکساکا سٹی,ܘܐܟܐܩܐ ܕܝ ܟܘܐܪܝܣ,वाशाका दे हुआरेझ,वाहाका डे जुएरेज़,ਵਾਹਾਕਾ ਦੇ ਖ਼ੁਆਰਿਸ,วาฮากา,གའཀགྲོང་།,ოახაკა-დე-ხუარესი,ወሓካ ዴ ዋሬዝ,オアハカ,瓦哈卡市,오악사카|17.06542|-96.72365|P|PPLA|MX||20|067|||262566||1567|America/Mexico_City|2015-06-22

@holta
Copy link
Member Author

holta commented Jan 30, 2018

Amazing...how close we are?

I hope we can make kidproof geography a focus given every school I've talked to recently (elementary, middle, high) takes this very seriously.

Whether or not locally comprehensive detail can be layered on, deepening these 10 base (National Geographic) layers within the local country/region!

CC @m-anish

@tim-moody
Copy link
Contributor

rachel's search php is the source of the search problem. we need to define the search algorithm and then re-implement it. iiab's approach was better, but the ui is flawed. (actually we have not really tried Joel's subsequent changes.

how close are we? not very.

@holta
Copy link
Member Author

holta commented Jan 30, 2018

how close are we? not very

Could we restrict (typing) accents (into the textfield search box) in the short term?

Since the cities are showing up correctly, except for the very final stage of visualizing them?

(And work with @jasco too, for the longer-term solution below?)

rachel's search php is the source of the search problem. we need to define the search algorithm and then re-implement it. iiab's approach was better, but the ui is flawed. (actually we have not really tried Joel's subsequent changes.

@holta
Copy link
Member Author

holta commented Feb 7, 2018

how close are we? not very

@tim-moody is it possible you misunderstood? Accented cities ARE appearing correctly in the dropdown.

The only thing that's not happening is the very, very final step — displaying the MAP of such accented cities — i.e. when users click on those accented cities in the dropdown.

(This would seem to be a straightforward bug very possibly: if these accented cities' latitudes/longitudes are indeed known...seemingly these lat/long's are just getting messed up during the final tile-rendering stage?)

@holta
Copy link
Member Author

holta commented Feb 8, 2018

@tim-moody explained during our community/team call (http://minutes.iiab.io) that he sees no easy way to fix this, without reworking the PHP logic — or possibly hacking the database to include plaintext unaccented citynames as well?

In any case in Spanish-speaking countries, it would appear that something like 1/3 of all cities contain accents, and so currently do not display as a result of this bug.

Crude-but-useful Workaround for Teachers:

  1. Just type the first few letters of the city into the textfield / search box (type slowly!) while observing the cities that autocomplete in the dropdown menu. Stop typing before it's too late, i.e. BEFORE you've narrowed the choice to just 1 city. e.g. type "oax" instead of "Oaxaca" (which would force the undisplayable "Oaxaca de Juárez"). Or type "tuxtla" with 2 search results, instead of the undisplayable "Tuxtla Gutiérrez".

  2. Then hit Enter (don't click on the individual accented city name!) Both/all such cities' in the autocomplete/dropdown (that begin with those unaccented letters) will then be correctly displayed on the map, with a red teardrop over each!

You can try this live at http://dev.worldpossible.org/mods/en-worldmap-10/map.html (not perfect but better than nothing :-)

@tim-moody
Copy link
Contributor

this sounds like a good workaround and is even simpler than you say. type 'oaxaca' and press enter and the map will be positioned to Oaxaca. But pause and a drop down will appear and selection of an item in that dropdown with an accent will fail. Basically, if you press enter the entire search list is marked on the map with the map positioned to the item at the top of the list. Try typing 'par' and enter and zoom out to see the whole world.

@holta
Copy link
Member Author

holta commented Feb 8, 2018

type 'oaxaca' and press enter and the map will be positioned to Oaxaca

Good Catch: it tolerates even more letters, so that multiple cities need not be shown.

Conclusion: teacher training can involve typing in all letters up to (but not including) the 1st accented character of the city name — and then hit Enter (or click on the magnifying glass) — but do not click on the actual accented city name in the dropdown!

e.g. "Tuxtla G" works (shows the capital of Chiapas) better than "Tuxtla" (showing 2 different cities) — whereas "Tuxtla Gutiérrez" shows nothing at all.

This doesn't solve all cases (i.e. when city names like "León" contain accents on the left side in the very 1st few letters, they're impossible to display) but still this workaround-for-teachers is a massive win, allowing geography classes to take this much more seriously.

@holta
Copy link
Member Author

holta commented Apr 26, 2018

IIAB 6.5 has brought us many improvements here. Thanks to the many contributors who made this happen.

Hopefully an even more complete solution will allow students/teachers to find OSM cities that contain accents in many languages — even without these recent training/UX hacks — as part of IIAB 6.6 or 7.0.

@holta
Copy link
Member Author

holta commented Aug 25, 2018

This appears partially or largely solved by Vector-based OSM approach @ #877, #1033 ?!

@holta
Copy link
Member Author

holta commented Sep 2, 2018

Seems good enough!

(But please re-opened as nec!)

@holta holta closed this as completed Sep 2, 2018
@holta holta modified the milestones: 6.7, 6.6 Sep 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants