How to set a smaller globe view? Camera.moveBackward?

Hello,
i need to resize my default view to a smaller globe and i try this but nothing happens:

var masterCamera = viewer.scene.camera;
var ellipsoid = viewer.scene.globe.ellipsoid;
var cameraHeight =ellipsoid.cartesianToCartographic(masterCamera.position).height;
var moveRate = cameraHeight / 10000.0;
  masterCamera.moveBackward(moveRate);

Is there any other way to reduce de default zoom level at the beginning?

Thanks

Hello,

Using moveBackward should work. You might just need a larger moveRate.

Here’s an example that worked for me:

var viewer = new Cesium.Viewer(‘cesiumContainer’);
viewer.scene.camera.moveBackward(100000000);

``

Best,

Hannah

Thanks Hannah,
i try to use local tiles (in localhost) using TileMapServiceImageryProvider and UrlTemplateImageryProvider but it doesn't work. Using SingleTileImageryProvider make my browswer to slow because the images are hight resolution. How can i use the tiles correctly?
ex:
new Cesium.UrlTemplateImageryProvider({
    url : '../images/tiles/ravenstein/{z}/{x}/{reverseY}.jpg',
    tilingScheme : new Cesium.GeographicTilingScheme(), //??
    maximumLevel : 5

Lia

Hi Lia,

Look at this tutorial about imagery layers: http://cesiumjs.org/tutorials/Imagery-Layers-Tutorial/

We also have an example of how to add a variety of different imagery layer types here: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Imagery%20Layers%20Manipulation.html&label=Showcases

Finally, if you are zoomed out really far and don’t need detailed imagery, you can use the Natural Earth II imagery we provide with the Cesium release. The files are really small and it runs locally.

Here is an example of how to use it:

var viewer = new Cesium.Viewer('cesiumContainer', { imageryProvider : Cesium.createTileMapServiceImageryProvider({ url : 'Path/To/Build/Cesium/Assets/Textures/NaturalEarthII' }), baseLayerPicker : false });

Best,

Hannah

Hi Hannah,
i tried and the "TileMapServiceImageryProvider()" worked but the map cover just 1/4 for the entire globe and "createTileMapServiceImageryProvider" did not, i don't know why. Is there any option or something that i can do to cover the whole globe? "rectangle : Cesium.Rectangle.MAX_VALUE" did also nothing.

Hello,

It should cover the whole globe by default. Can you paste a code sample? Are there any errors in the console?

Best,

Hannah

Hi Hannah,
the errors are on the tiles files.

new Cesium.TileMapServiceImageryProvider({
            url : require.toUrl('Assets/Textures/behaim'),
      rectangle : Cesium.Rectangle.MAX_VALUE};

I have 7 folders on behaim folder (0..6) and here are the errors (i use GDAL2tiles to generate the tiles, i also have a tilemapsource.xml, i can open it on openlayers and all the missing files here exist):

Error: WebGL: texImage2D: Uploading ArrayBuffers with FLIP_Y or PREMULTIPLY_ALPHA is slow. Texture.js:118:17
An error occurred in "TileMapServiceImageryProvider": Failed to obtain image tile X: 1 Y: 0 Level: 0. TileProviderError.js:130:1
An error occurred in "TileMapServiceImageryProvider": Failed to obtain image tile X: 3 Y: 1 Level: 1. TileProviderError.js:130:1
An error occurred in "TileMapServiceImageryProvider": Failed to obtain image tile X: 2 Y: 1 Level: 1. TileProviderError.js:130:1
An error occurred in "TileMapServiceImageryProvider": Failed to obtain image tile X: 3 Y: 0 Level: 1. TileProviderError.js:130:1
An error occurred in "TileMapServiceImageryProvider": Failed to obtain image tile X: 2 Y: 0 Level: 1. TileProviderError.js:130:1
An error occurred in "TileMapServiceImageryProvider": Failed to obtain image tile X: 1 Y: 0 Level: 1. TileProviderError.js:130:1
An error occurred in "TileMapServiceImageryProvider": Failed to obtain image tile X: 0 Y: 0 Level: 1. TileProviderError.js:130:1
An error occurred in "TileMapServiceImageryProvider": Failed to obtain image tile X: 3 Y: 1 Level: 2. TileProviderError.js:130:1
An error occurred in "TileMapServiceImageryProvider": Failed to obtain image tile X: 2 Y: 1 Level: 2. TileProviderError.js:130:1
An error occurred in "TileMapServiceImageryProvider": Failed to obtain image tile X: 3 Y: 0 Level: 2. TileProviderError.js:130:1
An error occurred in "TileMapServiceImageryProvider": Failed to obtain image tile X: 2 Y: 0 Level: 2. TileProviderError.js:130:1
GET
http://localhost/Cesium_manip/Source/Assets/Textures/behaim/2/7/2.png [HTTP/1.1 404 Not Found 24ms]
GET
http://localhost/Cesium_manip/Source/Assets/Textures/behaim/2/6/2.png [HTTP/1.1 404 Not Found 6ms]
GET
http://localhost/Cesium_manip/Source/Assets/Textures/behaim/2/7/3.png [HTTP/1.1 404 Not Found 18ms]
GET
http://localhost/Cesium_manip/Source/Assets/Textures/behaim/2/6/3.png [HTTP/1.1 404 Not Found 18ms