@arcgis/core: Error loading OS MasterMap vector tiles - console shows multiple: "Cannot read properties of undefined (reading 'getAttributeLocations')"
See original GitHub issue@arcgis/core version
Using version: @arcgis/core@4.21.2
. I have also tested with version 19, 20 and the ‘next’ version (22).
Framework and build tools Using Angular 13.0.0 with Node 14.17.16. I have also tried different Angular versions (12.x.x) and Node combinations.
Describe the bug When loading the OS MasterMap Vector layer (https://www.ordnancesurvey.co.uk/business-government/products/vector-tile-api) the tiles will not render on the map and the following error is produced in the console:
core.mjs:6495 ERROR TypeError: Cannot read properties of undefined (reading 'getAttributeLocations') at l._loadWGLResources (WGLBrushVTLBackground.js:5) at l.drawMany (WGLBrushVTLBackground.js:5) at m.renderObjects (Painter.js:5) at p._renderBackgroundLayers (VectorTileContainer.js:5) at p._doRender (VectorTileContainer.js:5) at p.renderChildren (VectorTileContainer.js:5) at p.doRender (WGLContainer.js:5) at p.doRender (VectorTileContainer.js:5) at processRender (DisplayObject.js:5) at n.renderChildren (Container.js:5)
This error occurs with the 2d MapView but works OK with the 3d SceneView. (update: just tested with SceneView and I get the same error in the console - although the tiles render ok).
This error is from the Chrome console but the same error occurs on different browsers i.e. Firefox and Edge. It appears to be a rendering issue with WebGL although I am unable to find the source of the error or a resolution.
When checking the network tab in the console the data is being returned and with 200 OK
status code and the application loads the OS MasterMap Raster tiles successfully, so the OS services are working correctly.
Are you able to reproduce the bug in a vanilla JS app? It works ok in the a standard Esri JavaScript API application.
Expected behavior Vector OS MasterMap tiles to loads in mapView using @arcgis/core.
Reproduce the issue I am unable to provide an example of the application producing the error as access to the OS MasterMap API is via subscription and API key. We have also experienced the same error on a different Angular application using @arcgis/core.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Hi @ubatsukh I have just updated the @arcgis/core version with
npm install @arcgis/core@next
and it moved the version to 4.22.0-next.20211116 and I can confirm that the OS MasterMap vector layer is now working as expected. Thanks for your help!Did not mean to close the issue. Please close it out if you are able to verify.