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

suggest and reverse problems #84

Closed
loomsen opened this issue Mar 25, 2015 · 2 comments · Fixed by #124
Closed

suggest and reverse problems #84

loomsen opened this issue Mar 25, 2015 · 2 comments · Fixed by #124
Assignees

Comments

@loomsen
Copy link

loomsen commented Mar 25, 2015

I'm having a hard time getting the API to work properly, and also understanding which components I actually need. I changed the layers URL in the demo to work with our maps. This works. I also changed the API URL to our installation, but it will only show search results.
Suggest queries don't return anything

{"type":"FeatureCollection","features":[],"date":1427269933035}

reverse actually returns an error
TypeError: Cannot read property 'geometry' of undefined at demo.js:145 at angular.js:8598 at angular.js:12234 at k.$eval (angular.js:13436) at k.$digest (angular.js:13248) at k.$apply (angular.js:13540) at q (angular.js:8884) at u (angular.js:9099) at XMLHttpRequest.E.onreadystatechange (angular.js:9038)angular.js:10683 (anonymous function)angular.js:7858 (anonymous function)angular.js:12242 (anonymous function)angular.js:13436 k.$evalangular.js:13248 k.$digestangular.js:13540 k.$applyangular.js:8884 qangular.js:9099 uangular.js:9038 E.onreadystatechange

This is from a search query:

{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"id":"288998480","layer":"osmway","name":"Wien","alpha3":"AUT","admin0":"Austria","admin1":"Wien","admin2":"Wien","locality":"Wien","neighborhood":"Mariabrunn","text":"Wien"},"geometry":{"type":"Point","coordinates":[16.244355,48.201155]}},{"type":"Feature","properties":{"id":"8091317","layer":"osmnode","name":"Wien Ottakring","alpha3":"AUT","admin0":"Austria","admin1":"Wien","admin2":"Wien","locality":"Wien","neighborhood":"Breitensee","text":"Wien Ottakring, Wien"},"geometry":{"type":"Point","coordinates":[16.311194,48.211817]}},{"type":"Feature","properties":{"id":"8091320","layer":"osmnode","name":"Wien Hernals","alpha3":"AUT","admin0":"Austria","admin1":"Wien","admin2":"Wien","locality":"Wien","neighborhood":"Dornbach","text":"Wien Hernals, Wien"},"geometry":{"type":"Point","coordinates":[16.31483,48.223272]}},{"type":"Feature","properties":{"id":"8091331","layer":"osmnode","name":"Wien Gersthof","alpha3":"AUT","admin0":"Austria","admin1":"Wien","admin2":"Wien","locality":"Wien","neighborhood":"Gersthof","text":"Wien Gersthof, Wien"},"geometry":{"type":"Point","coordinates":[16.329063,48.230864]}},{"type":"Feature","properties":{"id":"8091423","layer":"osmnode","name":"Wien Heiligenstadt","alpha3":"AUT","admin0":"Austria","admin1":"Wien","admin2":"Wien","locality":"Wien","neighborhood":"Nuszdorf","text":"Wien Heiligenstadt, Wien"},"geometry":{"type":"Point","coordinates":[16.365545,48.248981]}},{"type":"Feature","properties":{"id":"9232378","layer":"osmnode","name":"Wien Jedlersdorf","alpha3":"AUT","admin0":"Austria","admin1":"Wien","admin2":"Wien","locality":"Wien","neighborhood":"Neujedlersdorf","text":"Wien Jedlersdorf, Wien"},"geometry":{"type":"Point","coordinates":[16.395964,48.274071]}},{"type":"Feature","properties":{"id":"9232410","layer":"osmnode","name":"Wien Floridsdorf","alpha3":"AUT","admin0":"Austria","admin1":"Wien","admin2":"Wien","locality":"Wien","neighborhood":"Neujedlersdorf","text":"Wien Floridsdorf, Wien"},"geometry":{"type":"Point","coordinates":[16.400016,48.256354]}},{"type":"Feature","properties":{"id":"9232449","layer":"osmnode","name":"Wien Traisengasse","alpha3":"AUT","admin0":"Austria","admin1":"Wien","admin2":"Wien","locality":"Wien","neighborhood":"Brigittenau","text":"Wien Traisengasse, Wien"},"geometry":{"type":"Point","coordinates":[16.383248,48.234871]}},{"type":"Feature","properties":{"id":"9232502","layer":"osmnode","name":"Wien Strebersdorf","alpha3":"AUT","admin0":"Austria","admin1":"Wien","admin2":"Wien","locality":"Wien","neighborhood":"Schwarzlackenausiedlung","text":"Wien Strebersdorf, Wien"},"geometry":{"type":"Point","coordinates":[16.381598,48.285661]}},{"type":"Feature","properties":{"id":"27024450","layer":"osmnode","name":"Wien Simmering","alpha3":"AUT","admin0":"Austria","admin1":"Wien","admin2":"Wien","locality":"Wien","neighborhood":"Simmering","text":"Wien Simmering, Wien"},"geometry":{"type":"Point","coordinates":[16.419459,48.170099]}}],"bbox":[16.244355,48.170099,16.419459,48.285661],"date":1427278983264}

Using the vagrant image is not an option for me, I need to integrate this into our infrastructure properly.

Any pointers what I could be missing?

@hkrishna
Copy link
Contributor

hkrishna commented Apr 6, 2015

Hey @loomsen! Is there a public facing link to your demo (with the changed URL layers parameters) that I can check out? My suspicion for why /suggest is not working is because maybe no geobias (lat and lon or bbox) is passed in the URL as parameters. /suggest required lat/lon for now as documented here

/reverse is failing because either the demo is not making a successful API call with the required params (lat, lon) or the API returns no results or results with incorrect geometry and this can happen sometimes if you pass lat for lon and vice-versa.

Do let me know if you still facing problems and I'll be glad to help you :)

@loomsen
Copy link
Author

loomsen commented Apr 7, 2015

hey @hkrishna, thank you for your comment. Actually, I just set up a test instance for you, where everything is working as expected o.O I guess I must have made a mistake in our development environment, I'll go through the process again.

Thank you very much, nevertheless :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants