rinigus / osmscout-server

Maps server providing tiles, geocoder, and router
https://rinigus.github.io/osmscout-server
GNU General Public License v3.0
166 stars 28 forks source link

No venue types in Narby Venues using OSMScout #410

Open Talkless opened 2 years ago

Talkless commented 2 years ago

There's no way to select (filter) wanted amenities in Nearby Venues search when using OSMScount, or at least I have no idea how to use this feature if it works.

Type is only "Any".

I can search by Name, but I can't filter gas stations, toilets, ATM's, etc and similar by type..?

P.S. I have built app as unconfined in Ubuntu Touch, so DBus mediation should not be a problem if it uses DBus in this case?

rinigus commented 2 years ago

This is weird. Type should be available. It could indicate that the offline server process has not started or there is some issue with communication between it and Pure Maps. Try to check if you can see http://localhost:8553/v1/poi_types in your phone from browser.

Talkless commented 2 years ago

This is what I get:

phablet@ubuntu-phablet:~$ wget http://localhost:8553/v1/poi_types -O-
--2022-10-25 21:43:40--  http://localhost:8553/v1/poi_types
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:8553... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:8553... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/json]
Saving to: ‘STDOUT’

-                                           [<=>                                                                          ]       0  --.-KB/s               [
    "Any"
]
-                                           [ <=>                                                                         ]      14  --.-KB/s    in 0s      

2022-10-25 21:43:41 (673 KB/s) - written to stdout [14]
rinigus commented 2 years ago

Have you compiled OSM Scout Server or are using a distributed one?

Talkless commented 2 years ago

Distributed from Open-Store, as it is already unconfined, I did not need to rebuilt it for UBPorts.

rinigus commented 2 years ago

OK, looking into the code of OSM Scout Server:

These are the settings and data that would determine tags loaded for you. Looks like either data or language selection and locale are not covered...

Talkless commented 2 years ago

do you geocoder-npl-tag-aliases.json somewhere inside click package?

$ find /opt/click.ubuntu.com/osmscout-server.jonnius/current/ -name geocoder-npl-tag-aliases.json
/opt/click.ubuntu.com/osmscout-server.jonnius/current/usr/share/osmscout-server/data/geocoder-npl-tag-aliases.json

cat geocoder-npl-tag-aliases.json | jq ".alias2tag | keys" gives me:

[
  "af",
  "ar",
  "br",
  "ca",
  "cs",
  "de",
  "de_at",
  "en",
  "es",
  "et",
  "eu",
  "fa",
  "fi",
  "fr",
  "gl",
  "hr",
  "hu",
  "ia",
  "is",
  "it",
  "ja",
  "mk",
  "nl",
  "no",
  "pl",
  "ps",
  "pt",
  "ru",
  "sk",
  "sl",
  "sv",
  "uk",
  "vi"
]

which languages have you selected in OSM Scout Server settings?

Only "lt" (Lithuanian).

what is your locale variable?

$ locale
LANG=lt_LT.UTF-8
LANGUAGE=lt
LC_CTYPE="lt_LT.UTF-8"
LC_NUMERIC=lt_LT.UTF-8
LC_TIME=lt_LT.UTF-8
LC_COLLATE="lt_LT.UTF-8"
LC_MONETARY=lt_LT.UTF-8
LC_MESSAGES="lt_LT.UTF-8"
LC_PAPER=lt_LT.UTF-8
LC_NAME=lt_LT.UTF-8
LC_ADDRESS=lt_LT.UTF-8
LC_TELEPHONE=lt_LT.UTF-8
LC_MEASUREMENT=lt_LT.UTF-8
LC_IDENTIFICATION=lt_LT.UTF-8
LC_ALL=

Since I don't see lt in geocoder-npl-tag-aliases.json, that's the reason Venues feature fails?

Maybe it could just fallback to international en if language selected does not have mappings?

rinigus commented 2 years ago

Yes, exactly. That's a reason it fails in your case. Try to add English to OSM Scout Server settings and see if it improves the situation. Not sure I should enable en as universal fallback. There should be a way for users to chose the one that works.

Talkless commented 2 years ago

Yes, if I enable en it starts to work.

Maybe it's worth to show warning in OSM Scout Server if there's no aliases are available for that language?

rinigus commented 2 years ago

I moved the issue to OSM Scout Server repository