Hide map objects temporarily in Here Navigate edition

60 Views Asked by At

Previously in the Here maps Premium edition you could toggle the visibility of a map object via mapObject.isVisible. There seems to be no such property in the new Navigate edition, so are we supposed to completely remove/add them each time we want to hide a map object?

1

There are 1 best solutions below

0
On

Yes, this is correct. There is no such convenience method. Instead, you simply remove the map item. Or add it again later. This is a fast operation that happens on the next frame, so there is actually no need to control the visibility on the item itself.

However, what you can do is to call setVisibilityRanges(). This will show/hide e.g. a map marker dependent on zoom level. And this can be also updated on-the-fly.