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

SingleTileImagery spanning IDL #5840

Closed
BigDog6432 opened this issue Sep 19, 2017 · 7 comments
Closed

SingleTileImagery spanning IDL #5840

BigDog6432 opened this issue Sep 19, 2017 · 7 comments

Comments

@BigDog6432
Copy link

Found an issue where the SingleTileImageryProvider does not seem to work if the image spans the International Date Line. The following Sandcastle ImageryLayer snippet demonstrates the issue:
var viewer = new Cesium.Viewer('cesiumContainer', {
imageryProvider : new Cesium.ArcGisMapServerImageryProvider({
url : 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer'
}),
baseLayerPicker : false
});

var layers = viewer.imageryLayers;
var blackMarble = layers.addImageryProvider(Cesium.createTileMapServiceImageryProvider({
url : 'https://cesiumjs.org/blackmarble',
credit : 'Black Marble imagery courtesy NASA Earth Observatory',
flipXY : true // Only old gdal2tile.py generated tilesets need this flag.
}));
blackMarble.alpha = 0.5;
blackMarble.brightness = 2.0;

layers.addImageryProvider(new Cesium.SingleTileImageryProvider({
url : '../images/Cesium_Logo_overlay.png',
rectangle : Cesium.Rectangle.fromDegrees(175.0, 28.0, -170.0, 29.75)
}));

What is rendered on the Globe is the Cesium icon and the letter "C".

Jerrold Stoy

@ggetz
Copy link
Contributor

ggetz commented Sep 20, 2017

Thanks for the bug report @BigDog6432, and thanks for writing up an example. We'll try to look at this soon, there are a few other international date line related issues with clipping that are high priority.

@hpinkos hpinkos changed the title SingleTileImagerySpanning International Date Line SingleTileImagery spanning IDL Oct 17, 2017
@greenlaw
Copy link

greenlaw commented Nov 15, 2017

I'm running into the same issue - are there any potential workarounds I could test while a formal solution is being investigated (other than chopping the image at the dateline and overlaying with two separate SingleTileImageryProvider instances)?

I've tried using non-normalized longitude values for the western or eastern rectangle boundary (e.g. 190 instead of -170) - but still no dice.

@hpinkos
Copy link
Contributor

hpinkos commented Nov 15, 2017

Hi @greenlaw, as a workaround you could try using a Rectangle instead. See this demo

@greenlaw
Copy link

@hpinkos Thanks, will try using the Entity/Rectangle/Material approach and report back if I run into any issues.

@hpinkos
Copy link
Contributor

hpinkos commented Aug 23, 2018

@BigDog6432 ah sorry, it looks like this was a recent regression. I've opened up an issue so we can fix the rectangle here: #6951

@hpinkos
Copy link
Contributor

hpinkos commented Sep 19, 2019

Duplicate #2195

@hpinkos hpinkos closed this as completed Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants