Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaplyRemoteTileInfoNew MaplySamplingParams MaplyQuadImageLoader #1615

Open
JunglerSSS opened this issue Jun 21, 2024 · 1 comment
Open

MaplyRemoteTileInfoNew MaplySamplingParams MaplyQuadImageLoader #1615

JunglerSSS opened this issue Jun 21, 2024 · 1 comment

Comments

@JunglerSSS
Copy link

JunglerSSS commented Jun 21, 2024

I have two tile sources source1 and source2 that need to be displayed to box1 and box2 respectively. When I only load one at a time, both images appear correctly. When I load source1 and source2 at the same time, they both appear superimposed in the first place (box1).

`// 1
let tileInfo1 = MaplyRemoteTileInfoNew(baseURL: "(url1)/{z}/{y}/{x}.png",minZoom: 0, maxZoom: 20)
tileInfo1.cacheDir = thisCacheDir1
tileInfo1.coordSys = sys1

let params1 = MaplySamplingParams()
params1.coordSys = sys1
params1.coverPoles = false
params1.edgeMatching = false
params1.maxZoom = tileInfo1.maxZoom()
params1.singleLevel = true

guard let imageLoader1 = MaplyQuadImageLoader(params: params1, tileInfo: tileInfo1, viewC: mapViewController) else { continue }
imageLoader1.flipY = false
imageLoader1.baseDrawPriority = kMaplyImageLayerDrawPriorityDefault - 1000

// 2
let tileInfo2 = MaplyRemoteTileInfoNew(baseURL: "(url2)/{z}/{y}/{x}.png", minZoom: 0, maxZoom: 20)
tileInfo2.cacheDir = thisCacheDir1
tileInfo2.coordSys = sys2

let params2 = MaplySamplingParams()
params2.coordSys = sys2
params2.coverPoles = false
params2.edgeMatching = false
params2.maxZoom = tileInfo2.maxZoom()
params2.singleLevel = true

guard let imageLoader2 = MaplyQuadImageLoader(params: params2, tileInfo: tileInfo2, viewC: mapViewController) else { continue }
imageLoader2.flipY = false
imageLoader2.baseDrawPriority = kMaplyImageLayerDrawPriorityDefault - 1000
`

@sjg-wdw
Copy link
Collaborator

sjg-wdw commented Jun 21, 2024

I'm not sure how you're controlling the box1 and box2 areas. Perhaps a picture would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants