Uncaught TypeError: this.shape.getType is not a function When tried to use map erase tools in satellite view

Blessy Gnanamanickam 40 Reputation points
2024-05-26T23:40:42.9066667+00:00

I attempted to add map tools to the satellite view. While functionalities like drawing points, lines, circles, polygons, and rectangles are working as expected, I encountered an issue with editing and erasing geometries. Specifically, when I try to delete/edit a geometry, I receive the following error: ‘Uncaught TypeError: this.shape.getType is not a function.’ Any assistance would be greatly appreciated.

Uncaught TypeError: this.shape.getType is not a function

    _clearHandlesAndListeners https://atlas.microsoft.com/sdk/javascript/drawing/1/atlas-drawing.min.js:312

    erase https://atlas.microsoft.com/sdk/javascript/drawing/1/atlas-drawing.min.js:312

    selectShape https://atlas.microsoft.com/sdk/javascript/drawing/1/atlas-drawing.min.js:312

    t https://atlas.microsoft.com/sdk/javascript/mapcontrol/3/atlas.min.js:108

    fire https://atlas.microsoft.com/sdk/javascript/mapcontrol/3/atlas.min.js:55

    click https://atlas.microsoft.com/sdk/javascript/mapcontrol/3/atlas.min.js:105

    handleEvent https://atlas.microsoft.com/sdk/javascript/mapcontrol/3/atlas.min.js:105

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

Accepted answer
  1. rbrundritt 16,236 Reputation points Microsoft Employee
    2024-05-27T02:21:20.5333333+00:00

    I'm able to reproduce this. I think this is a newer error, possibly introduced when the map styling framework changed with v3. I wrote this tool that makes heavy use of satellite imagery and drawing tools and never encountered this issue previously: https://github.com/microsoft/satellite-imagery-labeling-tool However, it uses the satellite with labels style and that still seems to work fine. Try using that style as a temporary workaround. I'll send this over to the maps team so they can investigate.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful