question

LlavoreVans-2425 avatar image
1 Vote"
LlavoreVans-2425 asked KoushalJain-0157 commented

Indoor Map NameAlt

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://docs.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
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@LlavoreVans-2425 Thanks for your query. Community SME's on this topic or our team will review your scenario and circle back at the possible earliest time.

1 Vote 1 ·
LlavoreVans-2425 avatar image
1 Vote"
LlavoreVans-2425 answered KoushalJain-0157 commented

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}');
     });


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @LlavoreVans-2425 Please accept your helpful response as an answer, so that other community members find this post useful.

1 Vote 1 ·

Hi @LlavoreVans-2425 ,

I have used the above code snippet. I was able to see the nameAlt text instead of name but the text is repeating 2-3 times for units in Azure Map.
Also, Is there a way by which I can control the font of text-field. Please let me know your inputs.


0 Votes 0 ·
AshokPeddakotla-MSFT avatar image
0 Votes"
AshokPeddakotla-MSFT answered SatishBoddu-MSFT converted comment to answer

@LlavoreVans-2425 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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.