Mapsforge - get domain values of POI-file

18 views
Skip to first unread message

Erich Melinz

unread,
Mar 13, 2021, 5:40:12 PM3/13/21
to Mapsforge & VTM

In the package org.mapsforge.samples.android there is the class PoiSearchViewer,
which has the variable private static final String POI_CATEGORY = "Restaurants";

How can I get all possible domain values ("Restaurants", "Cinemas",...) out of a POI-file?

I have a POI-file from openandromaps.org which has quite a bit long domain values e.g. "Drinking water / Trinkwasser".
How do I have to adjust the class PoiSearchViewer, that I can only search with e.g. "Trinkwasser"?

Thank you!

Emux

unread,
Mar 14, 2021, 4:44:01 AM3/14/21
to mapsfo...@googlegroups.com
> How can I get all possible domain values ("Restaurants", "Cinemas",...) out of a POI-file?

You can use the PoiCategoryManager.getRootCategory().deepChildren() to retrieve all categories.


> I have a POI-file from openandromaps.org which has quite a bit long domain values e.g. "Drinking water / Trinkwasser".
> How do I have to adjust the class PoiSearchViewer, that I can only search with e.g. "Trinkwasser"?

The poi categories are configured by the poi file creators.

You can search by name / tags, see the documentation about filtered search.
(this API is demonstrated in VTM repository)

--
Emux
Reply all
Reply to author
Forward
0 new messages