「epsg-4326.js(8-ol3cesium17.js)」は、マップを表示するための JavaScript ファイルです。
OL3-Cesium API は、現在、すべて実験的(experimental)なものです。
「8-ol3cesium18.js」
var view = new ol.View({
projection: 'EPSG:4326',
center: [-100, 35],
zoom: 3
});
var layer = new ol.layer.Tile({
/** ol.layer.Tile
* For layer sources that provide pre-rendered, tiled
* images in grids that are organized by zoom levels for
* specific resolutions.
* プリレンダリング(事前描画)を提供するレイヤソースのための、
* 特定の解像度でのズームレベルによって編成されているグリッドの
* タイルイメージ。(ol3 API)
*/
source: new ol.source.TileWMS({
/** ol.source.TileWMS
* Layer source for tile data from WMS servers.
* WMS サーバからのタイルデータのレイヤソース。
* (ol3 API)
*/
url: 'http://demo.boundlessgeo.com/geoserver/wms',
params: {
'LAYERS': 'ne:NE1_HR_LC_SR_W_DR'
}
})
});
var overlay = new ol.layer.Tile({
opacity: 0.7,
extent: [-124.74, 24.96, -66.96, 49.38],
source: new ol.source.TileWMS(/** @type {olx.source.TileWMSOptions} */ ({
/** @type
* 値のタイプ(型)の説明 - 式などで表示
* (@use JSDoc[http://usejsdoc.org/]より)
*/
url: 'http://demo.boundlessgeo.com/geoserver/wms',
params: {'LAYERS': 'topp:states', 'TILED': true},
serverType: 'geoserver',
crossOrigin: 'anonymous' /** crossOrigin * The crossOrigin attribute for loaded images. Note * that you must provide a crossOrigin value if you * are using the WebGL renderer or if you want to * access pixel data with the Canvas renderer. See * https://developer.mozilla.org/en-US/docs/Web/HTML/ * CORS_enabled_image for more detail. * ロードされたイメージの crossOrigin属性。WebGLのレンダ * ラーを使用している場合、または、キャンバスレンダラでピ * クセルデータにアクセスする場合、crossOrigin 値を提供な * ければならないことに注意してください。詳細は * https://developer.mozilla.org/en-US/docs/Web/HTML/ * CORS_enabled_image を参照してください。(ol3 API) */
})) });
var ol2d = new ol.Map({
layers: [layer, overlay],
target: 'map2d',
view: view
});
var ol3d = new olcs.OLCesium({map: ol2d});
/** new olcs.OLCesium(options)
* map: The OpenLayers map we want to show on a Cesium scene.
* Cesium シーンで表示したい OpenLayers マップ。
* (OL3-Cesium API)
*/
var scene = ol3d.getCesiumScene(); /** getCesiumScene() * (OL3-Cesium API に説明がありませんでした。) */
var terrainProvider = new Cesium.CesiumTerrainProvider({
/** new CesiumTerrainProvider(options)
* A TerrainProvider that access terrain data in a Cesium
* terrain format. The format is described on the Cesium
* wiki.
* セシウム地形(Cesium terrain)フォーマットの地形(terrain)
* データにアクセスする TerrainProvider。フォーマットは、セシウ
* ムウィキに記載されています。
* (Cesium refdoc)
*/
// url : '//cesiumjs.org/stk-terrain/tilesets/world/tiles' // 2015.10.2 変更 url : '//assets.agi.com/stk-terrain/world' /** url * The URL of the Cesium terrain server. * セシウム地形(Cesium terrain)サーバの URL。 * (Cesium refdoc) */
});
scene.terrainProvider = terrainProvider;
ol3d.setEnabled(true); /** setEnabled(enable) * Enables/disables the Cesium. This modifies the visibility * style of the container element. * セシウムを有効または無効にします。これは、コンテナ要素の可視 * 性スタイルを変更します。 * (OL3-Cesium API) */Chromium では表示できないので、Iceweasel(Firefox)のアドレスバーに
http://localhost/~user/ol3cesiumproj/public_html/8-ol3cesium18.html
と入力して表示します。


0 件のコメント:
コメントを投稿