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

TileMapServiceImageryProvider extent does not work #416

Closed
pjcozzi opened this issue Dec 28, 2012 · 5 comments · Fixed by #970 or #2181
Closed

TileMapServiceImageryProvider extent does not work #416

pjcozzi opened this issue Dec 28, 2012 · 5 comments · Fixed by #970 or #2181
Assignees
Labels
good first issue An opportunity for first time contributors type - bug

Comments

@pjcozzi
Copy link
Contributor

pjcozzi commented Dec 28, 2012

Open the Black Marble example. Replace the addImageryProvider call with the following:

imageryLayerCollection.addImageryProvider(new Cesium.TileMapServiceImageryProvider({
    url : 'http://cesium.agi.com/blackmarble',
    maximumLevel : 8,
    extent : new Cesium.Extent(
        Cesium.Math.toRadians(-75.0),
        Cesium.Math.toRadians(28.0),
        Cesium.Math.toRadians(-67.0),
        Cesium.Math.toRadians(29.75)),
    credit : 'Black Marble imagery courtesy NASA Earth Observatory'
}));
imageryLayerCollection.addImageryProvider(new Cesium.SingleTileImageryProvider({
    url : '../images/Cesium_Logo_overlay.png',
    extent : new Cesium.Extent(
        Cesium.Math.toRadians(-75.0),
        Cesium.Math.toRadians(28.0),
        Cesium.Math.toRadians(-67.0),
        Cesium.Math.toRadians(29.75))
})); 

Run it. The Black Marble layer does not take up the same extent as the single image. As you zoom in and out, its extent changes.

@drola
Copy link

drola commented Apr 19, 2013

I did some research on this bug. It appears that Cesium.TileMapServiceImageryProvider.getExtent() returns proper coordinates. In less detailed zoom levels the tile is bigger than the extent which means that when extent returned by imagery provider is smaller than extent of the tile, tile should be cropped.

@kring
Copy link
Member

kring commented Apr 19, 2013

Agreed, the tile should be cropped. I believe there's code to do that in place in ImageryLayer._createTileImagerySkeletons. I'd have to look into it more deeply to learn why it's not working.

@kring
Copy link
Member

kring commented Apr 26, 2013

This problem only happens when the tiles on the server have a different extent from the extent specified in the constructor. It looks like the extent is used to limit which imagery tiles are associated with terrain tiles, but it is not used to limit the portion of the imagery tiles that applied to those terrain tiles.

@shunter
Copy link
Contributor

shunter commented Jul 30, 2013

I gather from @kring's comments in #970 that this is not actually fixed.

@shunter shunter reopened this Jul 30, 2013
@mcecchetti
Copy link

I open a pull request: #1010

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue An opportunity for first time contributors type - bug
Projects
None yet
5 participants