-
Notifications
You must be signed in to change notification settings - Fork 20
Conversation
I updated the routing machine which also fixes #92 |
Modifying the geocoder control/routing machine is really f*cked up...Because I found no way to modify them to match our needs, I decided to only use the backend functionality and implement the display and marker stuff myself. Thus this needs some polishing @jancborchardt ;) |
In the current state of this PR the initial two issues (#18 and #38) are fixed and IMO it looks quite good! :) |
this.options.geocoder.geocode(this._input.value, this._loadBestResult, this); | ||
return false; | ||
},*/ | ||
|
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.
@v1r0x please remove code comments before merging
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.
Thanks for the info! Will do a cleanup before merging.
@v1r0x how do I test the current state? |
I you checkout this branch you should have a new input field in the top left corner. With that you can search for locations and there should be up to 5 suggestions. Clicking on one of them should center the map to that location. |
I know why I like firefox more than chrome... |
I see nothing in my chromium log. What version do you have and when did this occur? |
No idea what I changed but now it works. |
It is now possible to use the geocoder and routing machine. The suggestion popups are still a bit ugly and slide down the other input fields. @jancborchardt An idea how to display them above them? |
Sorry for the spam, but I updated parts of the code.
What doesn't work:
I'd love to finish this PR the next days and thus finish the 0.1 milestone. |
Good news! Of course I'll clean up the code and squash some of the commits after positive review. |
@v1r0x seems you need to rebase? ;) |
@jancborchardt Should I first rebase or wait for review and rebase it right before merging? |
@v1r0x rebasing might introduce mistakes, so it doesn't hurt to keep your branch updated (even during development). |
@Henni @jancborchardt rebased and ready for review ;) |
@jancborchardt your help is needed! I also don't know how to fix the suggestion list as mentioned in #111 (comment) @v1r0x BTW limiting the search fields to 5 is ok. Maybe we should rethink this in the future, but let's leave it like this for now. |
This is old code, I think checking if
I think this is a race condition of the jquery stuff. I thought using
Totally forgot to fix this^^'
What exactly do you mean? The positioning and floating of the list should work as planned.
Ok. Thanks for your comments! |
This is what I mean: |
This is a bug and there should be not more than 5 results. The problem is the same as with your "strange results". If you type too fast, it calls the function several times...async... |
@v1r0x you probably want to use a debounce function (https://davidwalsh.name/javascript-debounce-function) |
@Henni Thanks! I'll test it later |
Seems to work! :) |
Hi, I write and correctly detects the direction, but every time I click shows the next error in the console, and it does nothing
p.s: You are using Nominatim????? According to their policy you should not make more that a query per second.. Thanks you!!.. 😁 |
@v1r0x you didn't use the debounce function correctly. The search still fired multiple times. input.addEventListener('keyup', debounce(function() {
geocodeSearch.performGeocode(input)
}, 250)); And maybe you should replace @matiasdelellis thanks for your comment. Did you try the latest state of the branch? Maybe it is already fixed.
Could you please take a look @v1r0x and verify if we are allowed to use this API. |
@v1r0x It would be great if you rebase once more and also squash (at least some of) the commits. |
4642123
to
40a795d
Compare
Should be fixed.
Should be fixed as well.
squashed the commits down to 7. @Henni Could you test once more? |
Hopefully this is now fixed as well! |
looks good to me |
d9b4e31
to
d21c6af
Compare
Ok, ready to merge? |
Will remove some old code and squash again...done! |
3aae399
to
94eb53b
Compare
One small thing to nag about: do you want to squash the "small fixes and updates" commit to keep the commit history clean? Or rename it to something like "cleanup geocoder rework"? Otherwise 👍 |
94eb53b
to
3f4e37c
Compare
Awesome! |
fixes #18 #38
This PR includes a new geocoder with suggestions and (hopefully contact addresses #8 ). Except the contact stuff it already works, but I think it needs some polishing @jancborchardt ;).
The old geocoder is still present. Will remove it before merge. But it is already possible to test the new solution.
cc @Henni @DJaeger