Dela via


VenueMapOptions

Note

Bing Maps Web Control SDK retirement

Bing Maps Web Control SDK is deprecated and will be retired. Free (Basic) account customers can continue to use Bing Maps Web Control SDK until June 30th, 2025. Enterprise account customers can continue to use Bing Maps Web Control SDK until June 30th, 2028. To avoid service disruptions, all implementations using Bing Maps Web Control SDK will need to be updated to use Azure Maps Web SDK by the retirement date that applies to your Bing Maps for Enterprise account type. For detailed migration guidance, see Migrate from Bing Maps Web Control SDK and Migrate Bing Maps Enterprise applications to Azure Maps with GitHub Copilot.

Azure Maps is Microsoft's next-generation maps and geospatial services for developers. Azure Maps has many of the same features as Bing Maps for Enterprise, and more. To get started with Azure Maps, create a free Azure subscription and an Azure Maps account. For more information about azure Maps, see Azure Maps Documentation. For migration guidance, see Bing Maps Migration Overview.

Options used to customize how a Venue file is read and loaded via the VenueMapFactory.

When hosting a venue map at a custom endpoint, the venue map can be loader either using metadataLoader or metadataUrl. Therefore, only one of metadataLoader and metdataUrl should be included in VenueMapOptions.

Specifically, one should pay attention to the case where their data is hosted on a different domain where CORS is not enabled. In this case, the hosting site should create a templated webpage for hosting the data that is triggered by an additional parameter which allows for the file to be downloaded across domains. The parameter name is defined by the hosting website. The value for that parameter should be set to {callback}. See Load Venue Map Using Metadata Url with JSONP for an example of this.

Properties

Name Type Description
error function() The callback function invoked after venue map creation fails.
metadataLoader VenueMapMetadataLoader Method called to invoke loading of Venue metadata. If not specified, the data will be feteched from the value of metadataUrl.
metadataUrl string The custom url endpoint that returns a string or a function that returns a string. If the url contains the {callback} placeholder, it will be fetched as JSONP. Otherwise, it will be fetched as JSON using XHR.
showFloorSwitcher boolean If true, the floor switcher control is shown when this venue is visible. This property is false by default.
success function(venueMap: VenueMap ) The callback function invoked after a venue map is successfully created.
venueMapId string The id of the venue map.

Warning

The floor switcher is only shown if the navbar is using the square style


VenueMapMetadataLoader Method

Parameter Req? Description
venueMapId The ID of the venue to load
success The callback function invoked when the data for the venue is to be loaded
error The callback function invoked invoked when there's an error loading the data
market Country/region+language code for the current market