Remove Labels from Buildings and Venues
Last updated
Last updated
Are your building and venue labels disrupting your user experience?
Traditionally, both Buildings and Venues are treated as Locations in the Web SDK, inherently displaying Labels which might not always align with the desired user experience. A conventional method to manage their visibility is illustrated below via a setDisplayRule
It can be a best practice to set this display rule after initializing your MapsIndoors instance.
Here, MI_BUILDING
and MI_VENUE
are specific Location Types dedicated to facilitate display rule settings for Buildings and Venues respectively.
Enhancing User Interaction with Adaptive Zoom-Level Popups
Let's say a user zooms out to get a broad overview of a large campus or city area. At a lower zoom level, the display becomes less cluttered, paving the way for a more clear, bird's eye view of the venues available. Here’s where dynamic, zoom-dependent popups come into play, serving as intuitive markers and information windows. This example is specific to Mapbox, for Google Maps you will need to use info windows.
Integrating the following code snippet enables the application to listen for changes in zoom level, and depending on the zoom threshold, dynamically fetch venues and exhibit crisp, stylish popups at each venue’s anchor point:
What does this achieve?
When the map zoom level is below 19, unobtrusive popups appear, providing users with a quick overview of each venue’s name. Upon zooming in beyond the level 19, the popups discreetly vanish, preventing any visual obstruction and facilitating an unhindered exploration of the MapsIndoors map.