AzureMapsControl.Components icon indicating copy to clipboard operation
AzureMapsControl.Components copied to clipboard

Uncaught TypeError: Cannot read properties of undefined (reading '_getLayerIds')

Open Alexbits opened this issue 1 year ago • 1 comments

Switching between styles is impossible after adding controls to the map on the /Layers/LineLayerOnReady samples page. It looks like there is a problem with data sources/layers when map controls are added.

To reproduce, add the following to the AzureMap control:

 Controls="new Components.Controls.Control[]
          {
            new Components.Controls.ZoomControl(new Components.Controls.ZoomControlOptions { Style = AzureMapsControl.Components.Controls.ControlStyle.Dark }, AzureMapsControl.Components.Controls.ControlPosition.TopLeft),
            new Components.Controls.PitchControl(new Components.Controls.PitchControlOptions { Style = AzureMapsControl.Components.Controls.ControlStyle.Dark }, AzureMapsControl.Components.Controls.ControlPosition.TopRight),
            new Components.Controls.CompassControl(new Components.Controls.CompassControlOptions { Style = AzureMapsControl.Components.Controls.ControlStyle.Dark }, AzureMapsControl.Components.Controls.ControlPosition.BottomLeft),
            new Components.Controls.StyleControl(new Components.Controls.StyleControlOptions { Style = AzureMapsControl.Components.Controls.ControlStyle.Dark, MapStyles = MapStyle.All() }, AzureMapsControl.Components.Controls.ControlPosition.BottomRight)
          }"
image

Alexbits avatar Mar 28 '23 10:03 Alexbits