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 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
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 });
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.
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