Skip to content
Discussion options

You must be logged in to vote

I find a solution.
Merge props.extension when set PathStyleExtension in _subLayerProps.

new MVTLayer({
  id: 'foo',
  data: /** some mvt url */,
  renderSubLayers: (props) => {
    new GeoJsonLayer({
      ...props,
      id: `${props.id}_geometry`,
      _subLayerProps: {
        'line-strings': {
          extensions: [new PathStyleExtension({ dash: true }), ...props.extensions],
          getDashArray: [8, 8],
          dashJustified: true,
        },
        'polygons-stroke': {
          extensions: [new PathStyleExtension({ dash: true }), ...props.extenstions],
          getDashArray: [6, 6],
          dashJustified: true,
        },
      }
    })
  },
})

That's all fine. thanks.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by fifzteen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant