Tiles from local system with Mapproxy on the Cesium Globe is Flipped in XY position

146 views
Skip to first unread message

Geoneer

unread,
Jul 8, 2016, 10:01:41 AM7/8/16
to cesium-dev
hello all,

#1. I created a local tilecache on BING with MapProxy
#2. The tiles are saved on a local map inside a webproject
#3. In the website the local BING layer is added to the cesium globe:

            // TileMapService tile provider
            var Tiles_BING = '../../../mapproxy/BING/';

            var parameters = {
                transparent: true,
                tiled: true,
                format: 'image/png'
            };


            var BING = Cesium.createTileMapServiceImageryProvider({
                url: Cesium.buildModuleUrl(Tiles_BING)
            });
            var viewer = new Cesium.Viewer('cesiumContainer', {
                animation: false,
                baseLayerPicker: false,
                fullscreenButton: true,
                vrButton: true,
                geocoder: true,
                homeButton: true,
                infoBox: true,
                sceneModePicker: true,
                selectionIndicator: true,
                timeline: false,
                navigationHelpButton: false,
                navigationInstructionsInitiallyVisible: true,
                scene3DOnly: false,
                shadows: false,
                terrainShadows: true,
                orderIndependentTranslucency: true,
                //globe: new Globe(mapProjection.ellipsoid),
                //mapProjection: new Cesium.GeographicProjection(Cesium.Ellipsoid.WGS84),
                mapProjection: new Cesium.WebMercatorProjection(),
                //sceneMode: SceneMode.SCENE2D,
                //automaticallyTrackDataSourceClocks: true,
                showRenderLoopErrors: true,
                targetFrameRate: 25,
                useDefaultRenderLoop: true

            });


            viewer.imageryLayers.addImageryProvider(BING);

#4. The result looks like this the tiles are build up on the globe from the south to the north. This means the tile are flipped on the globe. See the attached images

#Q: How to put the tiles in the right order on the globe?



1.jpg
2.png

Hannah Pinkos

unread,
Jul 8, 2016, 10:21:54 AM7/8/16
to cesium-dev
Hello,

You might need to use the flipXY flag on the createTileMapServiceImageryProvider.
Here is an example:

var blackMarble = layers.addImageryProvider(Cesium.createTileMapServiceImageryProvider({
    url
: 'https://cesiumjs.org/blackmarble',
    credit
: 'Black Marble imagery courtesy NASA Earth Observatory',
    flipXY
: true
}));


Best,

Hannah

Geoneer

unread,
Jul 8, 2016, 5:05:30 PM7/8/16
to cesium-dev
Reply all
Reply to author
Forward
0 new messages