Error "map paused because potential out-of-memory crash"

VarQwerty 6 Reputation points
2020-10-15T11:25:44.97+00:00

I try load a large shapefile (2 GB) and get a error "map paused because potential out-of-memory crash".Which are possible solution to load this shapefile ?

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
655 questions
{count} vote

1 answer

Sort by: Most helpful
  1. rbrundritt 16,456 Reputation points Microsoft Employee
    2020-10-15T15:01:32.373+00:00

    That is a large shapefile (max possible size for a shapefile). I suspect you were trying to use the code sample for the web SDK that loads shapefiles that are less than 100MB. That sample loads everything in memory in the browser which the browser can't support. For large shapefiles, your best option is to load that data into a database and then create a simple service to query that data by bounding box as the map is moved around. This is a classic approach that has been used for the last decade or two.

    Another approach, that is a bit more complicated but creates a better user experience is to convert this file into a vector tile layer. By doing that the map will be able to easily load only the data it needs to render the map, at the resolution needed.

    1 person found this answer helpful.
    0 comments No comments