osmscout-server icon indicating copy to clipboard operation
osmscout-server copied to clipboard

No venue types in Narby Venues using OSMScout

Open Talkless opened this issue 3 years ago • 9 comments

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?

Talkless avatar Oct 24 '22 18:10 Talkless

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.

rinigus avatar Oct 25 '22 18:10 rinigus

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]

Talkless avatar Oct 25 '22 18:10 Talkless

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

rinigus avatar Oct 27 '22 16:10 rinigus

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

Talkless avatar Oct 28 '22 12:10 Talkless

OK, looking into the code of OSM Scout Server:

  • do you geocoder-npl-tag-aliases.json somewhere inside click package? That is the file where the tags are stored
  • which languages have you selected in OSM Scout Server settings?
  • what is your locale variable?

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...

rinigus avatar Oct 28 '22 18:10 rinigus

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?

Talkless avatar Oct 31 '22 10:10 Talkless

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.

rinigus avatar Oct 31 '22 17:10 rinigus

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?

Talkless avatar Nov 01 '22 19:11 Talkless

I moved the issue to OSM Scout Server repository

rinigus avatar Nov 06 '22 09:11 rinigus