How can I use Control Modules with React Azure Map

Anisha KC 125 Reputation points Microsoft Employee
2024-10-24T16:12:18.5466667+00:00

Hi,

We are using the react-azure-maps package. https://github.com/Azure/react-azure-maps#readme

We want to use the fullscreen module: https://github.com/Azure-Samples/azure-maps-fullscreen-control

Simply adding it to the map control options like below does not work.

const mapControls: IAzureMapControls[] = [
    {
        controlName: 'ZoomControl',
        options: { position: 'bottom-left' } as ControlOptions,
    },
    // Allow for a full screen experience
    {
        controlName: 'FullscreenControl',
        options: { position: 'top-right' } as ControlOptions,
        controlOptions: {
            hideIfUnsupported: true,
            style: 'auto',
        }
    }
];

How can we add the module and use it in our map to allow for full screen? Thank you!

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
743 questions
0 comments No comments
{count} votes

Accepted answer
  1. rbrundritt 18,686 Reputation points Microsoft Employee
    2024-10-24T16:44:28.29+00:00

    The Fullscreen control is only just being added to the main web SDK. The react SDK doesn't have it in. I recommend opening up an issue on that project to highlight that it's a new feature that can be added there, you are interested in having it, and track it.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.