Indoor Map NameAlt

Llavore, Vans 106 Reputation points
2021-08-02T10:43:48.93+00:00

Hi, I would like to ask if there is a way on how to display the nameAlt of a unit instead of the unit label in displaying the indoor map.

https://learn.microsoft.com/en-us/azure/azure-maps/drawing-package-guide
In the drawing package guide, it shows the unit label but how can we also display the nameAlt?

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
587 questions
{count} vote

Accepted answer
  1. Llavore, Vans 106 Reputation points
    2021-08-12T07:17:09.127+00:00

    Found a way to override the name of the units by using setLayoutProperty.
    the text-field on default uses the {name} of the units so I replaced it using the {nameAlt} after loading the maps

    See code below:

        map.events.add('load', function (e) {
            //Used the load event to get all the layers, including the layers for indoor maps.
            //Set the nameAlt in the text-field instead of name in indoor_global_unit_label
            map.map.setLayoutProperty('microsoft.maps.indoor.labels_indoor.indoor_global_unit_label', 'text-field', '{nameAlt}');
        });
    
    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 27,386 Reputation points
    2021-08-12T07:06:22+00:00

    @Llavore, Vans Apologies for the delay in response.

    Below is an update from our product team on this query. Hope this helps.

    The display name is handled by the SDK and currently there is no way to override that.

    If the response is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments