Skip to content

how to set tileOptions of a layer #498

Answered by ghettovoice
scil asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @scil ,
starting from the openlayers v3 cross-origin options was moved in to the source component.
So in vuelayers each tile image source component has a prop crossOrigin. You can set it to anonymous to avoid CORS issues with tile layers.

// tiled WMS source
<vl-layer-tile>
  <vl-source-tile-wms cross-origin="anonymous" ... />
</vl-layer-tile>

// XYZ source
<vl-layer-tile>
  <vl-source-xyz cross-origin="anonymous" ... />
</vl-layer-tile>

Replies: 1 comment

Comment options

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