publiclab / leaflet-blurred-location

A Leaflet-based interface for selecting a "blurred" or low-resolution location, to preserve privacy
https://publiclab.github.io/leaflet-blurred-location/examples/
GNU General Public License v3.0
35 stars 32 forks source link

Add error checking to geocodeStringAndPan #220

Closed nstjean closed 4 years ago

nstjean commented 4 years ago

Fixes #214

Prevent hanging when user uses the location autocomplete search if the call returns an error.

Trying this PR again, last branch I think was just too mixed up.

nstjean commented 4 years ago

Fixed the testing errors by removing the offending line, it did not want me referring the the results in a variable. Using response.results[0].geometry.location every time works.

cesswairimu commented 4 years ago

Hi @nstjean, sorry just seeing this just now...rebase should fix this. on your working branch locally do git rebase -i main (here delete all the commits that were not made by you if any)

nstjean commented 4 years ago

Ok, I'll try running that and see what I get!

nstjean commented 4 years ago

I think I did it!! I don't know what the rebase did to dist/Leaflet.BlurredLocation.js though. Should I run grunt build and make a new commit with the updated version?

jywarren commented 4 years ago

Ah, hm, it still seems out of date, but GitHub is indicating it can resolve the conflict so it must be pretty simple.

image

Does this have the /dist/ changes in it, so if we press "update branch" it should be merge-able? Thanks!

nstjean commented 4 years ago

Ok updated /dist/

nstjean commented 4 years ago

@jywarren This should be all set! Hopefully!

sagarpreet-chadha commented 4 years ago

:tada:
@jywarren it looks good to me! Thanks!