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

Add support for xyz map tiles format "https://tile.openstreetmap.org/{z}/{x}/{y}.png" #240

Open
alexiscatnip opened this issue Mar 8, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@alexiscatnip
Copy link

There is presently support for WMS and TMS map service formats.

But I would like to directly use some public apis which have the x/y/z/ format (osm tiles format?).

Examples:
https://tile.openstreetmap.org/{z}/{x}/{y}.png

`var om2Basemap = new Cesium.UrlTemplateImageryProvider({
url: "../../basemap/Default/{z}/{x}/{y}.png",
//url: 'https://maps-{s}.onemap.sg/v3/Default_HD/{z}/{x}/{y}.png',
credit: 'OneMap (Default)'
});

var custom = new Cesium.UrlTemplateImageryProvider({
url: '../../basemap/ortho_enhanced/tile/{z}/{x}/{y}.png',
credit: 'SLA'
});

var custom2 = new Cesium.UrlTemplateImageryProvider({
url: '../../basemap_hd/ortho_enhanced/tile/{z}/{x}/{y}.png',
credit: 'SLA',
maximumLevel: 20,
minimumLevel: 4
});

var custom3 = new Cesium.UrlTemplateImageryProvider({
url: '../../MapServer3/tile/{z}/{x}/{y}.png',
credit: 'SLA'
});

var osmBasemap = new Cesium.createOpenStreetMapImageryProvider({
url: 'https://a.tile.openstreetmap.org/',
credit: 'Open Street Map'
});

var om2Satellite = new Cesium.UrlTemplateImageryProvider({
url: 'https://maps-{s}.onemap.sg/v3/Satellite/{z}/{x}/{y}.png',
credit: 'OneMap (Default)'
});

var om2Grey = new Cesium.UrlTemplateImageryProvider({
url: '../../basemap/Grey/{z}/{x}/{y}.png',
credit: 'OneMap (Grey)'
});

var om2Night = new Cesium.UrlTemplateImageryProvider({
url: '../../basemap/Night/{z}/{x}/{y}.png',
credit: 'OneMap (Night)'
});

var eld = new Cesium.UrlTemplateImageryProvider({
url: 'https://maps-c.onemap.sg/v3/ELD/{z}/{x}/{y}.png',
credit: 'OneMap (Night)'
});`

@j9liu
Copy link
Contributor

j9liu commented Mar 28, 2023

Also requested in #262

@kring
Copy link
Member

kring commented Mar 29, 2023

CC CesiumGS/cesium-native#614

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

No branches or pull requests

3 participants