[Navigate SDK] Hide POI per categories on HERE Maps and a document defect
You may want to hide POIs per category on HERE Maps with HERE Mobile SDK use case
Since Navigate SDK v4.19.5.0 Map view: Deprecated MapScene.setPoiVisibility().
Use MapContentSettings.setPoiCategoriesVisibility() and MapContentSettings.resetPoiCategoriesVisibility() instead.
Reference:
HERE SDK for Android (Navigate) - Changelog
Get started with Maps
Class MapContentSettings (API Reference)
The HERE Explore SDK does not support this feature
HERE official document has defect about this feature as if it is available for Explore SDK, both in the Developer Guide and Change Log.
However, per live testing and API Reference, this feature is only available Navigate SDK but not for the Explore SDK.
Reference:
HERE SDK for Android (Explore) - Changelog - incorrect, setPoiCategoriesVisibility() and resetPoiCategoriesVisibility() are mentioned
Get started with Maps - incorrect, setPoiCategoriesVisibility() and resetPoiCategoriesVisibility() are mentioned
Class MapContentSettings (API Reference) - correct, setPoiCategoriesVisibility() and resetPoiCategoriesVisibility() are not mentioned
Feature validation and sample code
The replication uses the SDK Example app Hello Map with the following modification:
Source Code:<br /> // Hide POIs per category, for example, but stops and stations: List categoryIds = Arrays.asList( "400-4100-0036", "400-4100-0042", "400-4100-0341" ); MapContentSettings.setPoiCategoriesVisibility(categoryIds, VisibilityState.HIDDEN);<br />
Location at (52.51660, 13.40788) with distance in meter value 400.
Before:
After:
Reference:
* Places category system