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

Names of nations not recognized in autosearch #2186

Closed
ebarry opened this issue Jan 31, 2018 · 15 comments · Fixed by #2384
Closed

Names of nations not recognized in autosearch #2186

ebarry opened this issue Jan 31, 2018 · 15 comments · Fixed by #2384
Assignees
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute JavaScript

Comments

@ebarry
Copy link
Member

ebarry commented Jan 31, 2018

Related to the Geographic Features project #1416

Please describe the problem

What happened just before the problem occurred?

My goal was to location tag someone's profile with the nation that they specified in their bio, this case, Germany.

What did you expect to see that you didn't?

I typed Germany into the search box, and nothing happened. Are nations not searchable?

Next i tried to zoom in to manually choose the country, and i can't figure out which box to choose, but that's a different problem!
geographic-tagging-zoom-levels

Please show us where to look

any profile page, for instance, you can test on mine publiclab.org/people/liz

@jywarren
Copy link
Member

jywarren commented Jan 31, 2018 via email

@SidharthBansal
Copy link
Member

@jywarren @ebarry Yesterday I have also encountered the same problem. When you type in the country or state, the map does not automatically shows that typed in location.
But the latitude and longitude are updated as soon as we type in the country or state and press enter
However, when we save it, then it is saved to the right location.

@jywarren jywarren added help wanted requires help by anyone willing to contribute bug the issue is regarding one of our programs which faces problems when a certain task is executed JavaScript labels Feb 5, 2018
@ebarry
Copy link
Member Author

ebarry commented Feb 5, 2018

Thank you again for all your work @mridulnagpal ! This feature is elegant, and i love using it.

I'm wondering about typing place names, and if we should expect that any placename that has a search result in Google Maps would also have a search result in our location tagging system?

I found that when i type in Barataria Bay that the map does not move to that location, even though Google Maps itself does have Barataria Bay as a place name -- see this search result https://www.google.com/maps/place/Barataria+Bay/@29.3781947,-89.9872989,12z/data=!3m1!4b1!4m5!3m4!1s0x889fd379b8300d49:0x4134bdb99b1b24a5!8m2!3d29.3947018!4d-89.9440061

@jywarren
Copy link
Member

jywarren commented Feb 5, 2018

It also seems like there's an issue with the dropdown autocompletion - the demo properly shows suggestions:

https://publiclab.github.io/leaflet-blurred-location/examples/

screenshot 2018-02-05 at 11 24 53 am

But i see errors on the PublicLab.org implementation:

InvalidValueError: not an instance of HTMLInputElement
_.Pb @ js:38

...

application-77562176e14ba2183a17d8a12a9edb36.js:59785 Uncaught TypeError: Cannot read property 'url' of undefined

...

maps.googleapis.com/maps-api-v3/api/js/31/8a/places_impl.js:31 Uncaught TypeError: Cannot read property 'activeElement' of undefined

@jywarren
Copy link
Member

jywarren commented Feb 5, 2018

And no dropdown.

@jywarren
Copy link
Member

@Souravirus did I see you potentially found a solution to this? We're a bit stuck on it -- maybe we need to compare the exact HTML from the original example:

https://publiclab.github.io/leaflet-blurred-location/examples/

to the DOM in PublicLab.org:

https://github.com/publiclab/plots2/blob/master/app/views/locations/_form.html.erb

to see if there's something missing. Or maybe it's that the Google geocoding div is loaded with the page, but when a modal is asynchronously loaded, it happens /after/ the google library?

@jywarren jywarren added this to the Geographic features milestone Feb 15, 2018
@jywarren
Copy link
Member

I think this is 2 separate issues. One is an API rate overage:

"You have exceeded your daily request quota for this API. We recommend registering for a key at the Google Developers Console: https://console.developers.google.com/apis/credentials?project=_"

The second is that the auto-suggest system is not displaying a list of suggested places the way I screenshotted above. for that, i'm not sure but maybe it does have to do with the load order of the Google API code and the modal dialog.

@jywarren
Copy link
Member

@mridulnagpal
Copy link
Member

@jywarren @ebarry We will be getting rid of google API anyways this summer so I think this should be resolved when we do that. Sounds good?

@jywarren
Copy link
Member

I think it should be possible to figure this one out ahead of then, to be optimistic! Possibly if one of our new contributors or @publiclab/reviewers with some JavaScript experience would be able to tackle this one?

@sagarpreet-chadha
Copy link
Contributor

sagarpreet-chadha commented Feb 22, 2018 via email

@sagarpreet-chadha
Copy link
Contributor

Finally found the problem here ❤️ 😄 !

@sagarpreet-chadha
Copy link
Contributor

After hours of experimenting with code !
The autocomplete is working and drop-down is shown but below the container 😆 .

@jywarren
Copy link
Member

This is awesome. :-) 👍 🎈 🚄

@sagarpreet-chadha
Copy link
Contributor

sagarpreet-chadha commented Feb 24, 2018

This was indeed a tricky one ! Thank you 😄 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute JavaScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants