Use SimpleMeshLayer and MVT #9173
-
Hi, I am using something like this new MVTLayer({
binary: true,
id: 'mvt-layer',
data: `http://0.0.0.0:3000/{z}/{x}/{y}?time=${time.toISOString()}`,
minZoom: 9,
maxZoom: 20,
uniqueIdProperty: 'id',
pickable: true,
autoHighlight: true,
renderSubLayers: props => {
return [new GeoJsonLayer({
...props,
iconAtlas: '/icon.png',
iconMapping: '/icon_config.json',
getIcon: d => 'icon',
getIconSize: (d) => 25,
getIconAngle: (d) => 30,
iconSizeUnits: 'pixels',
iconSizeScale: 1,
autoHighlight: true,
pointType: 'icon',
},
}),
new SimpleMeshLayer({
...props,
id: 'SimpleMeshLayer',
getColor: (d) => [Math.sqrt(d.exits), 140, 0],
getOrientation: (d) => [0, Math.random() * 180, 0],
getPosition: (d) => d.coordinates,
mesh: 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/website/humanoid_quad.obj',
sizeScale: 30,
pickable: true,
loaders: [OBJLoader]
})
]
}
}) However I get the following error
but it does not give a clear explanation of what properties are causing the issue |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
As a principle, we do not include messages regarding programming mistakes when throwing exceptions, since all those strings would add considerable to the bundle size of the library. However we often include comments in the source code where we assert, so that developers can use the "break on exceptions" setting in the browser development tools to break on the exception and figure out what is going wrong that way. Can't guarantee that is the case here, but worth a try to see if you can spot the error that way. |
Beta Was this translation helpful? Give feedback.
-
I think its a data issue, I don't know your data properly, but this renders |
Beta Was this translation helpful? Give feedback.
I think its a data issue, I don't know your data properly, but this renders
https://codepen.io/grahambates/pen/mdNyGxV?editors=1111