mapbox / mapbox-scenekit

Other
231 stars 51 forks source link

Custom style over the terrain model #31

Closed LorenzoStucchi closed 6 years ago

LorenzoStucchi commented 6 years ago

I'm trying to put my custom style over the terrain mesh, but I obtain only a grey mesh. This is the command that I used:

let sURL = "mapbox://styles/lorenzostucchi/cjklalqeq2z9k2smshd5ntvlg"           
terrainNode.fetchTerrainTexture(sURL , zoom: 14, progress: { _, _ in },
completion: { image in NSLog("Texture load complete")
terrainNode.geometry?.materials[4].diffuse.contents = image  }) }
LorenzoStucchi commented 6 years ago

Hi, I solved the problem. The url should be written in this way not like the copied one from mapbox studio. let sURL = "lorenzostucchi/cjklalqeq2z9k2smshd5ntvlg"