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

Update pois logic #207

Closed
TimMcCauley opened this issue Apr 14, 2018 · 0 comments
Closed

Update pois logic #207

TimMcCauley opened this issue Apr 14, 2018 · 0 comments
Assignees
Milestone

Comments

@TimMcCauley
Copy link
Contributor

TimMcCauley commented Apr 14, 2018

As one poi can return multiple categories, we have to adapt the code in the client.

Before:

"properties": {
            "osm_id": 121252949,
            "osm_type": 2,
            "distance": 0.0,
            "category_id": 108,
            "category_name": "hotel",
            "category_group": "accomodation"
            "website": "http://www.hotel-muenchnerhof.com/",
            "name": "Bavaria Hotel M\u00fcnchner Hof",
            "phone": "+49 711 9257 00",
            "wheelchair": "no"
}

After:

"properties": {
            "osm_id": 121252949,
            "osm_type": 2,
            "distance": 0.0,
            "category_ids": {
                "108": {
                    "category_name": "hotel",
                    "category_group": "accomodation"
                }
            },
            "osm_tags": {
                "website": "http://www.hotel-muenchnerhof.com/",
                "name": "Bavaria Hotel M\u00fcnchner Hof",
                "phone": "+49 711 9257 00",
                "wheelchair": "no"
            }
        }

Code to change starting in $scope.locationsControl = ()..., just use the first category when you loop through.

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

No branches or pull requests

2 participants