Skip to content

Commit

Permalink
Merge pull request #991 from dbauszus-glx/xyz-tiles
Browse files Browse the repository at this point in the history
Provide format:tiles source and proj param
  • Loading branch information
RobAndrewHurst authored Nov 6, 2023
2 parents fd75ac6 + 3ac8f06 commit fe2908a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/layer/format/tiles.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
export default layer => {

layer.source ??= 'OSM'

layer.projection ??= 'EPSG:3857'

layer.L = new ol.layer.Tile({
source: new ol.source.OSM({
source: new ol.source[layer.source]({
projection: layer.projection,
url: decodeURIComponent(layer.URI),
opaque: false,
transition: 0,
transition: 0
}),
layer: layer,
zIndex: layer.style?.zIndex || 0
Expand Down

0 comments on commit fe2908a

Please sign in to comment.