"[esri.core.Accessor] Accessor#set Invalid property value" and "[esri.views.2d.layers.FeatureLayerView2D] TypeError: Cannot read property 'constructor' of undefined"
See original GitHub issueAnother issue with the webpack demo at https://github.com/Esri/jsapi-resources/tree/master/4.x/webpack/demo - both sample layers are returning the error message:
Logger.js:25 [esri.core.Accessor] Accessor#set Invalid property value, value needs to be one of ‘esri.symbols.SimpleFillSymbol’, ‘esri.symbols.PictureFillSymbol’, ‘esri.symbols.PictureMarkerSymbol’, ‘esri.symbols.SimpleLineSymbol’, ‘esri.symbols.SimpleMarkerSymbol’, ‘esri.symbols.TextSymbol’, ‘unknown’, ‘unknown’, ‘unknown’, ‘unknown’, ‘unknown’, ‘esri.symbols.CIMSymbol’, or a plain object that can autocast (having .type = ‘simple-fill’, ‘picture-fill’, ‘picture-marker’, ‘simple-line’, ‘simple-marker’, ‘text’, ‘line-3d’, ‘mesh-3d’, ‘point-3d’, ‘polygon-3d’, ‘web-style’, ‘cim’)
In the case of this demo the layers seem to draw OK despite the error message, but in my example I’m seeing this additional error message and the feature layers aren’t drawing at all.
[esri.views.2d.layers.FeatureLayerView2D] TypeError: Cannot read property ‘constructor’ of undefined at Object.s [as getOwnClassMetadata] (metadata.js:25)
let layer3 = new FeatureLayer({
url: "https://services7.arcgis.com/nMBRP09Dx4VqvXeZ/arcgis/rest/services/Indigenous_Locations/FeatureServer/0/",
renderer: {
type: "simple",
symbol: {
type: "simple-marker",
style: "circle",
color: "#6e6e6e",
size: "9px",
outline: {
color: [ 255, 255, 255 ],
width: 1
}
}
}
})
map.add(layer3)
Any suggestions? thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
At 4.17 including
'3d': false,
as a plugin feature breaks 2D feature layer symbols.https://github.com/Esri/jsapi-resources/blob/master/4.x/webpack/demo/webpack.config.js#L78
If you’re not seeing the error I’ll close this for now, as I’m actually using a different approach on my current project. Thanks for the fast responses