WebSceneControl

MapGISÈýά³¡¾°¿Ø¼þÀà

 

¹¹Ô캯Êý¼°Æä²ÎÊý˵Ã÷

¹¹Ô캯Êý£ºnew Cesium.WebSceneControl(elementId, SceneOptions)

¹¹Ô캯Êý²ÎÊý

ÀàÐÍ

ÃèÊö

elementId

Element | string

ÊÓͼÈÝÆ÷divµÄid

SceneOptions

object

MapGISÈýά³¡¾°³õʼ»¯Ïà¹Ø²ÎÊý

ʾÀý£º

var options = {

         timeline: true ,

        fullscreenButton: true

    };

varwebGlobe=newCesium.WebSceneControl('cesiumContainer',options);

SceneOptions

MapGISÈýά³¡¾°³õʼ»¯Ïà¹Ø²ÎÊý

ÊôÐÔ

ÀàÐÍ

ÃèÊö

ĬÈÏÖµ

animation [optional]

Boolean

ÊÇ·ñ´´½¨¶¯»­¿ØÖÆС×é¼þ

false

baseLayerPicker [optional]

Boolean

ÊÇ·ñ´´½¨Í¼²ã¿ØÖÆÏÔʾС×é¼þ

false

fullscreenButton [optional]

Boolean

ÊÇ·ñ´´½¨È«ÆÁ¿ØÖÆ°´Å¥

false

geocoder [optional]

Boolean

ÊÇ·ñ´´½¨µØÃû²éѯ¿ò

false

homeButton [optional]

Boolean

ÊÇ·ñ´´½¨¸´Î»°´Å¥

false

infoBox [optional]

Boolean

ÊÇ·ñÏÔʾÐÅÏ¢¿ò

false

sceneModePicker [optional]

Boolean

ÊÇ·ñÏÔʾ3D/2DÑ¡ÔñÆ÷

false

selectionIndicator [optional]

Boolean

ÊÇ·ñÏÔʾѡȡָʾÆ÷×é¼þ

false

timeline [optional]

Boolean

ÊÇ·ñÏÔʾʱ¼äÖá

false

navigationHelpButton [optional]

Boolean

ÊÇ·ñÏÔʾÏÔʾ°ïÖúµ¼º½°´Å¥

false

navigationInstructionsInitiallyVisible [optional]

Boolean

ÊÇ·ñÏÔʾµ¼º½Ö¸ÁîÃæ°å

false

showRenderLoopErrors [optional]

Boolean

ÊÇ·ñÏÔʾäÖȾ´íÎóÐÅÏ¢Ãæ°å

true

sceneMode [optional]

SceneMode

ÉèÖ󡾰ģʽ£¬Ä¬ÈÏΪÈýάÇòÃæÊÓͼ

Cesium.SceneMode.SCENE3D

shadows [optional]

Boolean

ÊÇ·ñÏÔʾÒõÓ°

false

keyEventEnable [optional]

Boolean

ÊÇ·ñÖ§³Ö¼üÅÌʼþ

true

 

ÊôÐÔ˵Ã÷

Viewer

ÊÓͼ

Scene

³¡¾°

popupContain

ÆøÅÝ

screenSpaceEventHandler

ʼþ¾ä±ú

Layers

ͼ²ã

Ellipsoid

µ±Ç°ÍÖÇò

tileGridShow

ÊÇ·ñÏÔʾÍßƬÍø¸ñÐÅÏ¢

elementID

·ÅÖÃÊÓͼµÄdivµÄid

 

½á¹¹¡¢Ã¶¾Ù¼°²ÎÊý˵Ã÷

MapGISTileOptions

Ìí¼ÓMapGISÍßƬÏà¹Ø²ÎÊý

ÊôÐÔ

ÀàÐÍ

ÃèÊö

ĬÈÏÖµ

tileRange [optional]

Rectangle

ÉèÖÃÍßƬ·¶Î§

Cesium.Rectangle.fromDegrees(-180, -90, 180, 90) £¬Ä¬ÈÏ·¶Î§ÎªÈ«Çò·¶Î§

colNum [optional]

Number

ÍßƬ³õʼ¼¶µÄÁÐÊý

2

rowNum [optional]

Number

ÍßƬ³õʼ¼¶µÄÐÐÊý

1

maxLevel [optional]

Number

ÍßƬ×î´óÏÔʾ¼¶Êý

19

proxy [optional]

string

´úÀí·¾¶

Null

WMSOptions

Ìí¼ÓWMS·þÎñÏà¹Ø²ÎÊý

ÊôÐÔ

ÀàÐÍ

ÃèÊö

ĬÈÏÖµ

version [optional]

string

WMS ·þÎñ°æ±¾ºÅ

1.1.0

proxy [optional]

string

´úÀíµØÖ·

Null

Map3DOptions

Ìí¼ÓµØͼÎĵµÏà¹Ø²ÎÊý

ÊôÐÔ

ÀàÐÍ

ÃèÊö

ĬÈÏÖµ

autoReset [optional]

Boolean

ÊÇ·ñ×Ô¶¯¶¨Î»

true

loaded [optional]

Boolean

»Øµ÷º¯Êý

function

GoogleMapType

Ìí¼Ó¹È¸èµØͼ·þÎñÏà¹Ø²ÎÊý

È¡Öµ

ÃèÊö

m@207000000

Google ʸÁ¿»¯µØͼ

r@207000000

Google ʸÁ¿»¯µØͼ

t@130

Google ʸÁ¿»¯µØͼ

s@130

Google Ó°ÏñµØͼ

h@207000000

Google µÀ·רÌâµØͼ

GoogleMapExtOptions

Ìí¼ÓÀ©Õ¹¹È¸èµØͼ·þÎñÏà¹Ø²ÎÊý

ÊôÐÔ

ÀàÐÍ

ÃèÊö

ĬÈÏÖµ

ptype [optional]

string

¹È¸èµØͼ·þÎñÀàÐÍ£¬ÀàÐÍÈçÏ£º

h £ºskeleton map light

m £ºÈ«µØͼ

p £º terrain+map

r £º skeleton map dark

t £ºµØÐÎͼ

s £ºÎÀÐǵØͼ

ÆäÖв»Í¬ÀàÐÍ¿ÉÒÔ»¥Ïà×éºÏ£¬ÀýÈçs,r»òÕßt,h

m

BaiduMapOptions

Ìí¼Ó°Ù¶ÈµØͼ·þÎñÏà¹Ø²ÎÊý

ÊôÐÔ

ÀàÐÍ

ÃèÊö

ĬÈÏÖµ

ptype

string

°Ù¶ÈµØͼ·þÎñÀàÐÍ£¬ÀàÐÍÈçÏ£º

tile £ºÍßƬ

sate £ºÎÀÐÇ

traffic £º½»Í¨

±ØÑ¡

OpenWeatherOptions

Ìí¼ÓÃâ·ÑÌìÆøµØͼ·þÎñÏà¹Ø²ÎÊý

ÊôÐÔ

ÀàÐÍ

ÃèÊö

ĬÈÏÖµ

type

string

ÌìÆø·þÎñÀàÐÍ£¬ÀàÐÍÈçÏ£º

Pressure £º´óÆøѹ

Temperature £ºÆøÎÂ

Windspeed £º·çËÙ

Clouds £ºÔÆͼ

Label £º±ê×¢

±ØÑ¡

appid

string

·ÃÎÊID£¬ÀýÈç

b1b15e88fa797225412429c1c50c122a1

±ØÑ¡

TDTuMapOptions

Ìí¼ÓÌìµØͼ·þÎñÏà¹Ø²ÎÊý

ÊôÐÔ

ÀàÐÍ

ÃèÊö

ĬÈÏÖµ

type

string

ÌìµØͼ·þÎñÀàÐÍ£¬ÀàÐÍÈçÏ£º

img £ºÓ°ÏñµØͼ

vec £ºÊ¸Á¿»¯µØͼ

ter £ºµØÐÎͼ

±ØÑ¡

TDTuMapByWMTSType

ͨ¹ýWMTS·½Ê½Ìí¼ÓÌìµØͼ·þÎñÏà¹Ø²ÎÊý

È¡Öµ

ÃèÊö

img

ÌìµØͼӰÏñ²ã

ter

ÌìµØͼµØÐβã

cta

ÌìµØͼע¼Ç²ã

SingImageOptions

Ìí¼ÓͼƬÏà¹Ø²ÎÊý

ÊôÐÔ

ÀàÐÍ

ÃèÊö

ĬÈÏÖµ

credit [optional]

Credit | string

Êý¾ÝÔ´µÄÐÅÓñêʶ£¬ËüÏÔʾÔÚ»­²¼ÉÏ

 

ellipsoid [optional]

Ellipsoid

ÍÖÇòÌå

WGS84 ÍÖÇò

PopupOptions

Ìí¼ÓPopupµ¯´°Ïà¹Ø²ÎÊý

ÊôÐÔ

ÀàÐÍ

ÃèÊö

ĬÈÏÖµ

scaleByDistance [optional]

Number

°´¾àÀë¼ÆËãËõ·Å±È

-1

translucencyByDistance [optional]

Number

°´¾àÀë¼ÆËã͸Ã÷¶È

-1

pixelOffsetScaleByDistance [optional]

Number

°´¾àÀë¼ÆËãÏñËØ´óС

-1

SceneMode

Çл»³¡¾°Ä£Ê½¹Ø²ÎÊý

È¡Öµ

ÃèÊö

3D

ÈýάµØÇòģʽ

2D

ƽÃæģʽ

COLUMBUS_VIEW

ÈýάƽÃæģʽ

MORPHING

2.5D ģʽ£¬¼´¶þάºÍÈýάÖмä¹ý¶ÉµÄģʽ

MouseEventType

×¢²áÊó±êʼþÀàÐÍÏà¹Ø²ÎÊý

È¡Öµ

ÃèÊö

LEFT_CLICK

Êó±ê×ó¼üµ¥»÷ʼþ

RIGHT_CLICK

Êó±êÓÒ¼üµ¥»÷ʼþ

MOUSE_MOVE

Êó±êÒƶ¯Ê¼þ

LEFT_DOUBLE_CLICK

Êó±ê×ó¼üË«»÷ʼþ

TxtPos

±ê×¢ÎÄ×ÖλÖÃÏà¹Ø²ÎÊý

È¡Öµ

ÃèÊö

center

ÎÄ×ÖλÓÚÖÐÐÄ

top

ÎÄ×ÖλÓÚÉÏ·½

bottom

ÎÄ×ÖλÓÚÏ·½

NavToolOptions

Ìí¼Óµ¼º½¹¤¾ßÏà¹Ø²ÎÊý

ÊôÐÔ

ÀàÐÍ

ÃèÊö

ĬÈÏÖµ

defaultResetView [optional]

Cartographic

|Rectangle

ÖØÖõØͼʱµÄĬÈÏÊÓͼ·¶Î§¡£

½ÓÊܵÄÖµÊÇCesium.CartographicºÍ Cesium.Rectangle¡£

±ÈÈ磺Cesium.Rectangle.fromDegrees(71, 3, 90, 14);

 

enableCompass [optional]

Boolean

ÊÇ·ñÆôÓÃÂÞÅÌ

true

enableZoomControls [optional]

Boolean

ÊÇ·ñÆôÓÃËõ·Å¿Ø¼þ

false

enableDistanceLegend [optional]

Boolean

ÊÇ·ñÆôÓþàÀëͼÀý

false

enableCompassOuterRing [optional]

Boolean

ÊÇ·ñÆôÓÃÖ¸ÄÏÕëÍâ»·

true

HeatMapBounds

Ìí¼ÓÈÈÁ¦Í¼µÄ·¶Î§Ïà¹Ø²ÎÊý

ÊôÐÔ

ÀàÐÍ

ÃèÊö

ĬÈÏÖµ

west

Number

Î÷¾­£¨µ¥Î»£º¶È£©

±ØÑ¡

east

Number

¶«¾­£¨µ¥Î»£º¶È£©

±ØÑ¡

south

Number

ÄÏ㣨µ¥Î»£º¶È£©

±ØÑ¡

north

Number

±±Î³£¨µ¥Î»£º¶È£©

±ØÑ¡

HeatMapData

Ìí¼ÓÈÈÁ¦Í¼µÄÊý¾ÝÏà¹Ø²ÎÊý

ÊôÐÔ

ÀàÐÍ

ÃèÊö

ĬÈÏÖµ

¡°x¡±

Number

¾­¶È£¨µ¥Î»£º¶È£©

±ØÑ¡

¡°y¡±

Number

γ¶È£¨µ¥Î»£º¶È£©

±ØÑ¡

¡°value¡±

Number

ÈÈÁ¦Êý¾ÝÖµ

±ØÑ¡

RotateOptions

¿ªÆôÊÓͼÏà»úÐýתÏà¹Ø²ÎÊý

ÊôÐÔ

ÀàÐÍ

ÃèÊö

ĬÈÏÖµ

position [conditional]

Cartesian3

ÈƵãµÄλÖÃ

µ±ÐýתÀàÐÍΪÈƵãÐýתʱ£¬´ËΪ±ØÑ¡

pitch [optional]

Number

Ïà»ú¸©Ñö½Ç£¨µ¥Î»£º¶È£©

30

distance [optional]

Number

Ïà»ú¾àÀëµãµÄ¾àÀ루µ¥Î»£ºÃ×£©

1000

duration [optional]

Number

ÈƵã·ÉÐÐÒ»ÖÜËùÓõÄʱ¼ä£¨µ¥Î»£ºÃ룩

10

clockRange [optional]

Number

Ñ­»··½Ê½

Cesium.ClockRange.CLAMPED

RotateType

¿ªÆôÊÓͼÏà»úÐýתÀàÐÍ

È¡Öµ

ÃèÊö

rotationAroundPos

ÈƵãÐýת

rotationAroundOwn

ÈÆ×ÔÉíÐýת

Rectangle

¾ØÐÎÀàÐÍÏà¹Ø²ÎÊý

ÊôÐÔ

ÀàÐÍ

ÃèÊö

ĬÈÏÖµ

west [optional]

Number

ÒÔ»¡¶È±íʾµÄ×îÎ÷¶Ë¾­¶È£¬·¶Î§Îª[-180£¬180]¡£

0.0

south [optional]

Number

ÒÔ»¡¶È±íʾµÄ×îÄ϶Ëγ¶È£¬·¶Î§Îª[-90£¬90]¡£

0.0

east [optional]

Number

ÒÔ»¡¶È±íʾµÄ×¾­£¬ÔÚ·¶Î§ÄÚ[-180£¬180]¡£

0.0

north [optional]

Number

ÒÔ»¡¶È±íʾµÄ×㣬·¶Î§Îª[-90£¬90]

0.0

Cartesian3

ÈýάµÑ¿¨¶ûµã

È¡Öµ

ÃèÊö

X

×ø±êµãx

Y

×ø±êµãy

Z

×ø±êµãz

Color

ÉèÖÃÑÕÉ«Ïà¹Ø²ÎÊý¡£Ê¹Óú졢ÂÌ¡¢À¶ºÍ°¢¶û·¨ÖµÖ¸¶¨µÄÑÕÉ«£¬·¶Î§´Ó0£¨ÎÞÇ¿¶È£©µ½1.0£¨È«Ç¿¶È£©¡£

ÊôÐÔ

ÀàÐÍ

ÃèÊö

ĬÈÏÖµ

red [optional]

Number

ºìÉ«³É·Ö

1.0

green [optional]

Number

ÂÌÉ«³É·Ö

1.0

blue [optional]

Number

À¶É«³É·Ö

1.0

alpha [optional]

Number

°¢¶û·¨Öµ

1.0

BillboardGraphics

ÉèÖÃͼƬ¶ÔÏóÏà¹Ø²ÎÊý¡£

ÊôÐÔ

ÃèÊö

image [optional]

Ö¸¶¨ÒªÒýÓõÄͼÏñ¡¢URI»ò»­²¼¡£

width [optional]

ÒÔÏñËØΪµ¥Î»£¬Ö¸¶¨Í¼Æ¬¿í¶ÈÊýÖµµÄÊôÐÔ¡£

height [optional]

ÒÔÏñËØΪµ¥Î»£¬Ö¸¶¨Í¼Æ¬¸ß¶ÈÊýÖµµÄÊôÐÔ¡£

pixelOffsetScaleByDistance [optional]

¸ù¾ÝÓëÏà»úµÄ¾àÀëÉèÖÃPixeLoffsetµÄÊôÐÔ¡£

LabelGraphics

ÉèÖÃÎı¾¶ÔÏóÏà¹Ø²ÎÊý¡£

ÊôÐÔ

ĬÈÏÖµ

ÃèÊö

text [optional]

 

Îı¾

font [optional]

'30px sans-serif'

×ÖÌå

fillColor [optional]

Color.WHITE

Ìî³äÉ«

verticalOrigin [optional]

VerticalOrigin.CENTER

ÉèÖô¹Ö±³Ì¶ÈµÄÊôÐÔ

horizontalOrigin [optional]

HorizontalOrigin.CENTER

ÉèÖÃˮƽ³Ì¶ÈµÄÊôÐÔ

pixelOffset [optional]

Cartesian2.ZERO

Ö¸¶¨ÏñËØÆ«ÒƵÄÊôÐÔ

translucencyByDistance [optional]

 

ÓÃÓÚ¸ù¾ÝÓëÏà»úµÄ¾àÀëÉèÖðë͸Ã÷

pixelOffsetScaleByDistance [optional]

 

ÓÃÓÚ¸ù¾ÝÓëÏà»úµÄ¾àÀëÉèÖÃPixeLoffset¡£

SkyBox

ÉèÖÃÌì¿ÕºÍ¶ÔÏóµÄÏà¹Ø²ÎÊý¡£

ÊôÐÔ

ÀàÐÍ

ĬÈÏÖµ

ÃèÊö

sources [optional]

Object

 

Áù¸ö¶àάÊý¾Ý¼¯Ó³ÉäÃæµÄÔ´URL»òͼÏñ¶ÔÏó

show [optional]

Boolean

true

È·¶¨ÊÇ·ñÏÔʾ´Ë»ùÔª¡£

 

IGServer·þÎñ½Ó¿Ú

appendMapGISTerrain (url,sceneIndex,layerIndex,proxy) ¡ú MapGISTerrainProvider

Ìí¼ÓMapGISµØÐÎÊý¾Ý

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

url

string

ÉèÖõØͼÎĵµÃû³Æ

sceneIndex

Number

³¡¾°Ë÷Òý

layerIndex

Number

µØÐβãËùÔÚ»º´æË÷Òý

proxy [optional]

string

´úÀíµØÖ·

ʾÀý£º

var proxy = '../config/Handler.ashx';
webglobe.appendMapGISTerrain('http://localhost:6163/igs/rest/g3d/MapGISTerrain', 0, 0,
proxy);

deleteTerrain()

ɾ³ýÊÓͼÖÐËùÓеØÐÎÊý¾Ý

ʾÀý£º

webglobe.deleteTerrain();

appendMapGISTile (url, MapGISTileOptions )

Ìí¼ÓMapGIS IGServer·¢²¼µÄÍßƬ·þÎñ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

url

string

ÍßƬ·þÎñµØÖ·

MapGISTileOptions

object

ÍßƬ²ÎÊýJSON¶ÔÏó

ʾÀý£º

var options = {

                 tileRang:Cesium.Rectangle.fromDegrees( -180 ,-90,180,90),

             colNum: 2 ,

                 rowNum: 1 ,

                 maxLevel: 5 ,

                 // proxy: '/ZDproxy.ashx',// ²»´æÔÚ¿çÓò¿É²»ÉèÖÃ

                 // Èç¹ûÍßƬ²ÃµÄ²»ÊÇ256ÔòÒª¸øÏÂÃæÁ½¸ö²ÎÊý

                 tileWidth: 256 ,

                 tileHeight: 256

                };

webGlobe.appendMapGISTile('http://localhost:6163/igs/rest/mrms/tile/WORDMAP4326', options);

append3DDocTile ( url,sceneIndex,layerIndex, MapGISTileOptions )

Ìí¼ÓMapGISÈýάµØͼÎĵµÖеÄÍßƬͼ²ã

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

url

string

ÍßƬ·þÎñµØÖ·

sceneIndex

Number

³¡¾°Ë÷Òý

layerIndex

Number

ÍßƬ²ãËùÔÚ»º´æË÷Òý

MapGISTileOptions

object

ÍßƬ²ÎÊýJSON¶ÔÏó

ʾÀý£º

var options = {

                 tileRang:Cesium.Rectangle.fromDegrees( -180 , -90 , 180 , 90 ),

                 // colNum: 2,

                 // rowNum: 1,

                 maxLevel: 6

                 // proxy: '../config/ZDproxy.ashx' // ²»´æÔÚ¿çÓò¿É²»ÉèÖÃ

                };

varmapDocLayer=webGlobe.append3DDocTile('http://localhost:6163/igs/rest/g3d/tile4326', 0 , 0 ,options);

append2DDocTile(url, options) ¡ú object

Ìí¼ÓMapGIS·¢²¼µÄ¶þάʸÁ¿µØͼÎĵµ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

url

string

ʸÁ¿µØͼÎĵµ·þÎñµØÖ·

MapGISDocOptions

object

ÍßƬ²ÎÊýJSON¶ÔÏó

ʾÀý£º

 

var Options ={
  tileRange:webRoot.Rectangle.fromDegrees(73.46256565,9.72186266,139.24977196,53.58000021),
      colNum:3,
      rowNum:2,
      maxLevel:10,
      proxy:'/Handler.ashx'//²»´æÔÚ¿çÓò¿É²»ÉèÖà   };

 

varmapDocLayer=webGlobe.append3DDocTile('http://localhost:6163/igs/rest/mrms/docs/¶þάʸÁ¿', Options );

 

append( url, Map3DOptions ) ¡úobject

Ìí¼ÓµØͼÎĵµ£¨M3D»º´æ¡¢»òÕß´æ´¢ÔÚMongoDBµÄM3D»º´æ£©

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

url

string

µØͼÎĵµ·þÎñ»ùµØÖ·

Map3DOptions

object

µØͼÎĵµ²ÎÊý

ʾÀý£º

var layers = webGlobe.append("http://localhost:6163/igs/rest/g3d/m3dtest", {});
var mongoDBLayer = webGlobe.append('http://localhost:6163/igs/rest/g3d/cache/MongoM3D', {});

removeDoc()

ÒƳýÌí¼ÓµÄµØͼÎĵµ

OGC·þÎñ½Ó¿Ú

appendWMSTile( url,layerName, WMSOptions ) ¡ú ImageryLayer

Ìí¼ÓWMS·þÎñͼ²ã

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

url

string

WMS·þÎñ»ùµØÖ·

layerName

string

ͼ²ãÃû³Æ

WMSOptions

object

WMS²ÎÊýJSON¶ÔÏó

ʾÀý£º

webGlobe.appendWMSTile("http://localhost:6163/igs/rest/ogc/doc/Î人һÕÅͼ/WMSServer","Î人¹â¹ÈµÀ·" , {version:"1.1.1"});

appendWMTSTile( url,layerName,tileMatrixSetID,maxLevel,startLevel )

Ìí¼ÓWMTS·þÎñͼ²ã

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

url

string

WMTS·þÎñ»ùµØÖ·

layerName

string

ͼ²ãÃû³Æ

tileMatrixSetID

string

¾ØÕó¼¯ID

maxLevel

Number

×î´óÏÔʾ¼¶±ð

startLevel

Number

³õʼ¼¶±ð ĬÈÏΪ0

ʾÀý£º

webGlobe.appendWMTSTile("http://localhost:6163/igs/rest/ogc/WMTSServer","wmts4326",

"EPSG:4326_WORDMAP4326_028mm_GB", 5 );

µÚÈý·½µØͼ·þÎñ½Ó¿Ú

appendGoogleMap( GoogleMapType )

Ìí¼Ó¹È¸èµØͼ·þÎñͼ²ã

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

GoogleMapType

string

¹È¸èµØͼÀàÐÍ

ʾÀý£º

webGlobe.appendGoogleMap('m@207000000');

appendGoogleMapExt( GoogleMapExtOptions )

Ìí¼Ó¹È¸èµØͼ·þÎñͼ²ã£¨À©Õ¹½Ó¿Ú£©

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

GoogleMapExtOptions

object

¹È¸èµØͼÀàÐͲÎÊýµÄJSON¶ÔÏó

ʾÀý£º

webGlobe.appendGoogleMapExt({ ptype: 'm' });

appendGaodeMap( isImageLayer, GaodeMapoptions) ¡ú[UrlTemplateImageryProvider]

Ìí¼Ó¸ßµÂµØͼ·þÎñͼ²ã

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

isImageLayer

Boolean

trueÓ°Ïñ£¬falseʸÁ¿

GaodeMapoptions

object

¸ßµÂµØͼÀàÐͲÎÊýµÄJSON¶ÔÏó

ʾÀý£º

webGlobe.appendGaodeMap( true );

appendBaiduMap( BaiduMapOptions )

Ìí¼Ó°Ù¶ÈµØͼ·þÎñͼ²ã

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

BaiduMapOptions

object

°Ù¶ÈµØͼÀàÐͲÎÊýµÄJSON¶ÔÏó

ʾÀý£º

webGlobe.appendBaiduMap({ptype: "sate" });

appendOpenWeatherMap( OpenWeatherOptions )

Ìí¼ÓÃâ·ÑµÄÌìÆø·þÎñͼ²ã

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

OpenWeatherOptions

object

ÌìÆøµØͼ·þÎñÀàÐÍ

ʾÀý£º

webGlobe.appendOpenWeatherMap({type:"Clouds",appid:"b1b15e88fa797225412429c1c50c122a1"});

appendTDTuMap( TDTuMapOptions )

Ìí¼ÓÌìµØͼ·þÎñͼ²ã

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

TDTuMapOptions

object

ÌìµØͼÀàÐͲÎÊýµÄJSON¶ÔÏó

ʾÀý£º

webGlobe.appendTDTuMap({type:"img"});

appendTDTuMapByWMTS( TDTuMapByWMTSType )

ͨ¹ýÌìµØͼWMTS·þÎñÌí¼Óͼ²ã

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

TDTuMapByWMTSType

string

ÌìµØͼÀàÐÍ

ʾÀý£º

webGlobe.appendTDTuMapByWMTS('img');

addImageLayer( imagelayer )

Ìí¼ÓÕ¤¸ñͼ²ã

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

Imagelayer

ImageryLayer

Õ¤¸ñͼ²ã

ʾÀý£º

var mapbox = new Cesium.MapboxImageryProvider({
mapId: 'mapbox.streets',
accessToken: 'pk.eyJ1Ijoid29ya2luZ2RvZyIsImEiOiJjamQyZmszenczMHRoMzRuczVzaGthbGhnIn0.H"+
"TkYTE-R82N3azqscSyHkA'

});

var imagelayer = new Cesium.ImageryLayer(mapbox, {
                            alpha: 1

                        })

webGlobe.addImageLayer(imagelayer);

removeImageryLayer( imagelayer )

ÒƳýÖ¸¶¨Õ¤¸ñͼ²ã

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

imagelayer

ImageryLayer

ÒªÒƳýµÄÕ¤¸ñͼ²ã¶ÔÏó

removeAllImageLayers( isdestroy )

Çå¿ÕÕ¤¸ñͼ²ã£¬ÔÚͼ²ãÐèҪƵ·±Çл»µÄÇé¿öÏ£¬isdestroy×îºÃÈ¡false

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

isdestroy

Boolean

ÊÇ·ñÏú»Ùͼ²ã

À©Õ¹Ìí¼Óͼ²ã½Ó¿Ú

appendTerrain( url,west,south,east,north ) ¡úobject

Ìí¼ÓµØÐηþÎñͼ²ã

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

url

string

µØÐηþÎñµØÖ·

west

Number

Î÷¾­

south

Number

ÄÏγ

east

Number

¶«¾­

north

Number

±±Î³

ʾÀý£º

webGlobe.appendTerrain();

appendImageByUrl( url,west,south,east,north ) ¡úImageryLayer

Ìí¼ÓͼƬ(Ö§³Ö±¾µØͼƬºÍÍøÂçͼƬ)ÌùºÏµ½Ò»¶¨·¶Î§

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

url

string

ͼƬµØÖ·£¬°üÀ¨±¾µØºÍÍøÂçÊý¾ÝÔ´

west

Number

Î÷¾­

south

Number

ÄÏγ

east

Number

¶«¾­

north

Number

±±Î³

ʾÀý£º

var earthface =webGlobe.appendImageByUrl('../appimg/world.jpg', -180.0, -90, 180.0, 90);

removeImage( imagelayer, isdestroy )

ÒƳýͼƬ£¬ÓëappendImageByUrl¶ÔÓ¦£¬ÔÚÐèҪƵ·±Çл»Í¼Æ¬µÄÇé¿öÏ£¬isdestroy×îºÃÈ¡false

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

imagerylayer

ImageLayer

ÒªÒƳýµÄͼƬ¶ÔÏó

isdestroy

Boolean

ÊÇ·ñÏú»Ù

appendTileMapServiceImage( url,TileMapServiceOptions ) ¡ú object

ͨ¹ýʹÓÃÖ¸¶¨µÄURLÄ£°åÇëÇóÍßƬÊý¾Ý

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

 url

string

ÍßƬ·þÎñµØÖ·

options

object

 

ʾÀý£º

var url = "http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png";
webGlobe.appendTileMapServiceImage(url, {});

append3DTile( url,onsuccess ) ¡úprimitive

Ìí¼Ó3DÍßƬÊý¾Ý¼¯£¨ÓÃÓÚÁ÷´«Ê亣Á¿Òì¹¹ÈýάµØÀí¿Õ¼äÊý¾Ý¼¯£©

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

 url

string

Êý¾ÝµØÖ·

onsuccess

Function

Ìí¼Ó³É¹¦ºóµÄ»Øµ÷º¯Êý

ʾÀý£º

webGlobe.append3DTile("http://localhost:8111/tileset.json",function(tileset) {

var boundingSphere = tileset.boundingSphere;
webGlobe.viewer.camera.viewBoundingSphere(boundingSphere, 
new Cesium.HeadingPitchRange(0.0, -0.5, boundingSphere.radius));

webGlobe.viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);

})

delete3DTile( tileset )

ɾ³ý3DÍßƬÊý¾Ý¼¯

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

 tileset

object

append3DTile ·µ»ØµÄ¶ÔÏó

appendModel( id,url,lon,lat,height,scale ) ¡úobject

Ìí¼ÓÄ£ÐÍ£¨gltfÎļþ£©

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

id

string

Ä£ÐÍID£¬×Ô¶¨Òå

url

string

Ä£ÐÍ·¾¶,Ò»°ãÊÇ.gltf¸ñʽ

lon

Number

Ä£ÐÍËùÔÚ¾­¶È

lat

Number

Ä£ÐÍËùÔÚγ¶È

height

Number

¸ß¶È

scale

Number

Ëõ·Å±È

options

object

Ïê¼û ModelGraphics µÄÆäËüoptions²ÎÊýÃèÊö

ʾÀý£º

var model = webGlobe.appendModel('model', '../data/model/fengji/donghua.gltf', 117.9298
, 40.3828, 0, 10);

removeModel( model )

ÒƳýÄ£ÐÍ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

model

Entity

ÒƳýͨ¹ý appendModel Ìí¼ÓµÄÄ£ÐÍ

appendModelsByFile( filePath,onsuccess )

ͨ¹ýÎļþÅúÁ¿Ìí¼ÓÄ£ÐÍÎļþ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

filePath

string

Ä£ÐÍ×éÖ¯Îļþ£¬°üÀ¨.czmlÓë.modelsÁ½ÖÖ¸ñʽ£¨JSON½á¹¹£©

onsuccess

Function

Ìí¼Ó³É¹¦ºóµÄ»Øµ÷º¯Êý

ʾÀý£º

varfilepath='../data/model/fengji2.czml' ; /*'../data/model/fengji2.models'*/ //.czml Óë.models¾ù¿É

webGlobe.appendModelsByFile(filepath,function(entities) {

varenti=entities.getById('aerogenerator3');

        if(enti==undefined) {

            alert('Ä£ÐÍ䶨Òå');

        }

        else{

              webGlobe.viewer.trackedEntity=enti;

        }

});

appendModels( modelsJSON,onsuccess )

ÅúÁ¿Ìí¼ÓÄ£ÐÍÎļþ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

modelsJSON

object

Ä£ÐÍ×éÖ¯µÄJSON¶ÔÏó

onsuccess

Function

Ìí¼Ó³É¹¦ºóµÄ»Øµ÷º¯Êý

ʾÀý£º

var models = [{
                        "id": "document",
                        "name": "Models",
                        "version": "1.0"
                    },
                    {
                        "id": "aerogenerator1",
                        "name": "·ç»ú1",
                        "position": {
                            "cartographicDegrees": [117.9298,40.3828, 0]
                        },
                        "model": {
                            "gltf": "../data/model/fengji/donghua.gltf",
                            "scale": 1,
                            "minimumPixelSize": 128
                        },
                        "description": "ÕâÊÇ1ºÅ·ç»ú"
                    },
                    {
                        "id": "aerogenerator2",
                        "name": "·ç»ú2",
                        "position": {
                            "cartographicDegrees": [117.9263,40.3831,0]
                        },
                        "model": {
                            "gltf": "../data/model/fengji/donghua.gltf",
                            "scale": 1,
                            "minimumPixelSize": 128
                        },
                        "description": "ÕâÊÇ2ºÅ·ç»ú"
                    },
                    {
                        "id": "aerogenerator3",
                        "name": "·ç»ú3",
                        "position": {
                            "cartographicDegrees": [117.9243,40.3830, ,0]
                        },
                        "model": {
                            "gltf": "../data/model/fengji/donghua.gltf",
                            "scale": 1,
                            "minimumPixelSize": 128
                        },
                        "description": "ÕâÊÇ3ºÅ·ç»ú"
                    }
                    ];
                    var modelsource = webGlobe.appendModels(models, function (entities) {
                        var enti = entities.getById('aerogenerator3');
                        if (enti == undefined) {
                            alert('Ä£ÐÍ䶨Òå');
                        }
                        else {

                               //webGlobe.viewer.flyTo(enti);

                            webGlobe.viewer.trackedEntity = enti;
                        }
                    });

removeModels( models )

ÒƳýÅúÁ¿Ìí¼ÓµÄÄ£ÐÍ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

models

CzmlDataSource

ÒƳýͨ¹ý appendModelsByFile ºÍ appendModels Ìí¼ÓµÄÄ£ÐÍ

appendKml( url,options ) ¡ú KmlDataSource

Ìí¼Ókml»òÕßkmzÎļþ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

url

string

kml»òÕßkmzÎļþ·¾¶

options [optional]

object

Ïê¼û KmlDataSource µÄÆäËüoptions²ÎÊýÃèÊö

ʾÀý£º

webGlobe.appendKml("../data/kml/bikeRide_wuhan.kml");

appendCZML( url,onsuccess ) ¡ú CzmlDataSource

Ìí¼ÓczmlÎļþ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

url

string

czmlÎļþ·¾¶

onsuccess

Function

Ìí¼Ó³É¹¦ºóµÄ»Øµ÷º¯Êý

ʾÀý£º

webGlobe.appendCZML('../data/model/fengji2.czml',function(entities) {

                              varenti=entities.getById('aerogenerator3');

                             if(enti==undefined) {

                                 alert('ʧ°Ü');

                            }

                            else{

                                webGlobe.viewer.trackedEntity=enti;

                             }

                        });

appendGeoJson( url ) ¡ú GeoJsonDataSource

Ìí¼ÓgeojsonÊý¾Ý

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

url

string

geojsonÎļþ·¾¶

ʾÀý£º

webGlobe.appendGeoJson('../data/china.topojson');

removeDataSource( datasource,isdestroy )

ɾ³ýÖ¸¶¨Êý¾ÝÔ´

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

datasource

DataSource

¶¨ÒåËùÓÐÊý¾ÝÔ´µÄ½Ó¿Ú

isdestroy

Boolean

ÊÇ·ñÏú»ÙÊý¾Ý

removeAllDataSource( isdestroy )

ɾ³ýÊÓͼÖÐËùÓÐÊý¾ÝÔ´

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

isdestroy

Boolean

ÊÇ·ñÏú»ÙÊý¾Ý

Ìí¼ÓʵÌå½Ó¿Ú

appendPoint( lon,lat,height, pName,pPixelSize,pColor,pOutlineColor,pOutlineWidth,description ) ¡ú Entity

Ìí¼ÓÈýάµã

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

lat

Number

¾­¶È

lon

Number

γ¶È

height

Number

¸ß³Ì

pName

string

µãÃû³Æ

pPixelSize

Number

ÏñËØ´óС

pColor

Color

µãÑÕÉ«   (webGlobe.getColor(1,0,0,1))

pOutlineColor

Color

µãµÄÂÖÀªÏßÑÕÉ«

pOutlineWidth

Number

µãµÄÂÖÀªÏß¿í¶È

description

string

ÊôÐÔÃèÊöÐÅÏ¢

Returns £º·µ»Øµã¶ÔÏó ÒƳýͨ¹ýremoveEntity(entity)

ʾÀý£º

webGlobe.appendPoint(115.2, 31, 200, 'µã', 10, webGlobe.getColor(1,0, 0, 1), 
webGlobe.getColor(1, 1, 0, 1), 2);

appendPointComm( lon,lat,height,pName,description,options ) ¡ú Entity

Ìí¼ÓÈýάµã

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

lat

Number

¾­¶È

lon

Number

γ¶È

height

Number

¸ß³Ì

pName

string

µãÃû³Æ

description

string

ÊôÐÔÃèÊöÐÅÏ¢

options [optional]

object

entity²ÎÊýÐÅÏ¢¶ÔÏó

ʾÀý£º

webGlobe.appendPointComm(115.2, 31, 200, 'µã', "Ìí¼ÓÈýάµã");

appendGraphics( options ) ¡úEntity

Ìí¼ÓÈýά¼¸ºÎͼÐÎ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

options

object

°üº¬entityÖÐÏà¹ØÑ¡ÏîÉèÖà { id: name: availability: show: description: position: orientation: viewFrom: parent: }

ʾÀý£º

var entityOption = {

                            position:Cesium.Cartesian3.fromDegrees( 114.0 ,40.0,300000.0),

                            box:newCesium.BoxGraphics({

                                // ³¤¿í¸ß

                         dimensions: new Cesium.Cartesian3(400000.0, 300000.0, 500000.0),

                                material:Cesium.Color.BLUE,

                                fill: false , // ²»ÏÔʾÌî³ä

                                outline: true , //ÏÔʾÂÖÀª

                                outlineColor:Cesium.Color.BLACK

                            })

                        }

webGlobe.appendGraphics(entityOption);

appendLabel( lon,lat,height,lText,options ) ¡úEntity

Ìí¼ÓÈýάÎÄ×Ö±ê×¢

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

lon

Number

¾­¶È

lat

Number

γ¶È

height

Number

¸ß³Ì

lText

string

±êÇ©ÄÚÈÝ

options [optional]

object

²ÎÊýÃû³Æ

ÀàÐÍ

ĬÈÏÖµ

ÃèÊö

font

String

'14pt monospace'

×ÖÌå

fillColor

Color

Cesium.Color.WHITE

×ÖÌåµÄÌî³äÉ«

outlineColor

Color

Cesium.Color.WHITE

×ÖÌåµÄÌî³äÉ«

style

LabelStyle

Cesium.LabelStyle.FILL_AND_OUTLINE

Ñùʽ

outlineWidth

Number

1

Íâ±ßÏß¿í¶È

heightReference

Number

Cesium.HeightReference.NONE

Íâ±ßÏß¿í¶È

verticalOrigin

VerticalOrigin

Cesium.VerticalOrigin.CENTER

±êǩλÖÃ

horizontalOrigin

HorizontalOrigin

Cesium.HorizontalOrigin.CENTER

±êǩλÖÃ

description

String

 

ÊôÐÔÃèÊö

Returns £º±êÇ©¶ÔÏó£¬ÒƳýͨ¹ýremoveEntity(entity)

ʾÀý£º

varoptions= {

    label: {

            font:'14pt¿¬Ìå',

            fillColor:Cesium.Color.BROWN,

            style:Cesium.LabelStyle.FILL_AND_OUTLINE,

            outlineWidth: 1,

            outlineColor:Cesium.Color.WHITE,

            verticalOrigin:Cesium.VerticalOrigin.CENTER, //´¹Ö±·½ÏòÒԵײ¿À´¼ÆËã±êÇ©µÄλÖÃ

            horizontalOrigin:Cesium.HorizontalOrigin.CENTER,

            pixelOffset:newCesium.Cartesian2( 0.0 , 0.0 ), //Æ«ÒÆÁ¿

            heightReference:Cesium.HeightReference.CLAMP_TO_GROUND,

            pixelOffsetScaleByDistance:newCesium.NearFarScalar( 1.5e2 , 3.0 , 1.5e7 , 0.5 ), //ËæÔ¶½üËõ·Å

            translucencyByDistance:newCesium.NearFarScalar( 1.5e5 , 1.0 , 1.5e7 , 0.0 ) //ËæÔ¶½üÒþ²Ø

            }

};

varlabel=webGlobe.appendLabel( 114.2 , 31 , 0 ,'ÕâÊÇÒ»¸ö±êÇ©',options);

appendBillboard( lon,lat,height,name,bImageUrl,bWidth,bHeight,options ) ¡ú Entity

Ìí¼ÓͼƬ±êÇ©

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

lon

Number

¾­¶È

lat

Number

γ¶È

height

Number

¸ß³Ì

name

string

±ê×¢Ãû³Æ

bImageUrl

string

ͼƬµØÖ·

bWidth

Number

ͼƬ¿í¶È

bHeight

Number

ͼƬ¸ß¶È

options [optional]

object

À©Õ¹²ÎÊý

Name

Type

Description

description

String

ÃèÊöÐÅÏ¢

Returns £ºÌí¼Ó¹«¸æ°å¶ÔÏó£¬ÒƳýͨ¹ýremoveEntity(entity)

ʾÀý£º

webGlobe.appendBillboard( 113.2 , 31 , 0 ,'ͼƬ','../appimg/ÓÒ³µ.png', 32 , 32 );

appendLabelIcon( text,lon,lat,height,font,fillColor,iconUrl,iconWidth,iconHeight,farDist,nearDist, TxtPos ,attribute ) ¡úEntity

Ìí¼Óͼ±ê×¢¼Ç

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

text

string

×¢¼ÇÎÄ×ÖÄÚÈÝ

lon

Number

¾­¶È

lat

Number

γ¶È

height

Number

¸ß³Ì

font

string

×ÖÌ壬ÕâÀォ×ÖÌåºÍ´óС·ÅÔÚÒ»Æð¡£ÀýÈ磺'14pt ¿¬Ìå'

fillColor

Color

×ÖÌåµÄÌî³äÉ«

iconUrl

string

ͼ±ê·¾¶

iconWidth

Number

ͼ±ê¿í¶È

iconHeight

Number

ͼ±ê¸ß¶È

farDist

Number

×îÔ¶ÏÔʾ¾àÀë

nearDist

Number

×î½üÏÔʾ¾àÀë

TxtPos

string

ÎÄ×ÖλÖ㬠'center','top','bottom'

attribute

string

ÆäËûÊôÐÔÐÅÏ¢

Returns £ºlabelIconͼ±ê×¢¼Ç¶ÔÏó£¬ÒƳýͨ¹ýremoveEntity(entity)

ʾÀý£º

webGlobe.appendLabelIcon('С³µ', 110 , 33 , 0 ,'14pt¿¬Ìå' , Cesium.Color.CHARTREUSE, '../data/kml/img/car.png',

64 , 64 , 100000 , 1 ,'bottom','ÕâÊÇÊôÐÔÐÅÏ¢²éѯʱ¿ÉÒÔ¿´µ½');

appendLabelIconComm( name,description,position,billboard,label ) ¡ú Entity

ͨÓ÷½Ê½Ìí¼ÓÈýάͼÎıê×¢

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

name

string

±ê×¢µÄÃû³Æ£¨·Ç×¢¼ÇÎÄ×ÖÄÚÈÝ£©

description

string

±ê×¢ÃèÊöÐÅÏ¢

position

Cartesian3

±êעλÖÃ

billboard

BillboardGraphics

ͼƬ¶ÔÏó

label

LabelGraphics

Îı¾¶ÔÏó

ʾÀý£º

varposition=newCesium.Cartesian3( 110 , 33 , 0 );

varbillboardGraphics=newCesium.BillboardGraphics({

    image:"../data/kml/img/car.png",

    width: 64 ,

    height: 64 ,

    //ËæÔ¶½üËõ·Å

    pixelOffsetScaleByDistance:newCesium.NearFarScalar( 1.5e5 , 3.0 , 1.5e7 , 0.5 ),

    //ËæÔ¶½üÒþ²Ø

    translucencyByDistance:newCesium.NearFarScalar( 1.5e5 , 1.0 , 1.5e7 , 0.0 ),

});

varlabelGraphics=newCesium.LabelGraphics({

      text:"С³µ",

     font:"14ptËÎÌå",

     fillColor:Cesium.Color.CHARTREUSE,

     verticalOrigin:Cesium.VerticalOrigin.BOTTOM,

     horizontalOrigin:Cesium.HorizontalOrigin.BOTTOM,

     //ËæÔ¶½üËõ·Å

     pixelOffset:newCesium.Cartesian2( 0.0 , -64 / 4 ), //x,y·½ÏòÆ«ÒÆÏà¶ÔÓÚÆÁÄ»

     pixelOffsetScaleByDistance:newCesium.NearFarScalar( 1.5e2 , 3.0 , 1.5e7 , 0.5 ),

     //ËæÔ¶½üÒþ²Ø

     translucencyByDistance:newCesium.NearFarScalar( 1.5e5 , 1.0 , 1.5e7 , 0.0 )

})

webGlobe.appendLabelIconComm("С³µ","ÕâÊÇÊôÐÔÐÅÏ¢²éѯʱ¿ÉÒÔ¿´µ½",position,billboardGraphics,labelGraphics);

 

appendPolygon( name,points,fillColor,outlineColor ) ¡ú Entity

Ìí¼ÓÈýά¶à±ßÐÎÇø

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

name

string

Ãû³Æ

points

Array

±ê×¢µãÊý×飨˳ÐòÊÇÄæʱÕ룩ÐÅÏ¢

fillColor [optional]

Color

ÇøÌî³äÉ«£¬Ä¬ÈÏ°×É«°ë͸Ã÷     

outlineColor [optional]

Color

ÂÖÀªÏßÑÕÉ«£¬Ä¬ÈϺìÉ«°ë͸Ã÷

Returns £º»æÖƵĶà±ßÐÎÇø¶ÔÏó ÒƳýͨ¹ýremoveEntity(entity)

ʾÀý£º

vararryp= [ -108.0, 25.0 , 100000 ,

                    -100.0 , 25.0 , 100000 ,

                    -100.0 , 30.0 , 100000 ,

                    -108.0 , 30.0 , 300000 ];

webGlobe.appendPolygon('¶à±ßÐÎ',arryp);

appendHolePolygon( name,lonLats_out,LonLats_in,options ) ¡ú Entity

Ìí¼Ó¶þά´ø¶´¶à±ßÐÎ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

name

string

Ãû³Æ

lonLats_out

Array

ÍâȦ×ø±ê£¬Ë³Ê±Õ룬ÀýÈç[x1,y1,x2,y2,x3,y3]

lonLats_in [optional]

Array

ÄÚȦ×ø±ê£¬Ë³Ê±Õ룬ÀýÈç[[x1,y1,x2,y2,x3,y3]]

options [optional]

object

²ÎÊý¶ÔÏó¡£

Returns £º»æÖƵĶà±ßÐÎÇø¶ÔÏó£¬ÒƳýͨ¹ýremoveEntity(entity)

ʾÀý£º

varlatLon_out= [ 95.1550 , 30.8902 , 95.1668 , 30.8800 , 95.1836 , 30.8902 , 95.1696 , 30.91 ];

varlanLon_in= [[ 95.1617 , 30.8902 , 95.1668 , 30.8882 , 95.1766 , 30.8939 , 95.1696 , 30.8996 ]];

varpolygonEntity=webGlobe.appendHolePolygon("´ø¶´Çø",latLon_out,lanLon_in);

appendHolePolygonOnTerrain( name,lonLats_out, lonLats_in,step,options,onsuccess )

Ìí¼Ó¿ÉÒÀ¸½ÓÚµØÐεĴø¶´¶à±ßÐÎ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

name

string

Ãû³Æ

lonLats_out

Number[]

ÍâȦ×ø±ê£¬Ë³Ê±Õ룬ÀýÈç[x1,y1,x2,y2,x3,y3]

lonLats_in [optional]

Number[Number[]]

ÄÚȦ×ø±ê£¬Ë³Ê±Õ룬ÀýÈç[[x1,y1,x2,y2,x3,y3]]

step

Number

ÀëÉ¢²½³¤

options [optional]

object

²ÎÊý¶ÔÏó

onsuccess

Function

Ìí¼Ó³É¹¦ºóµÄ»Øµ÷º¯Êý

ʾÀý£º

varlatLon_out= [ 95.1550 , 30.8902 , 95.1668 , 30.8800 , 95.1836 , 30.8902 , 95.1696 , 30.91 ];

varlanLon_in= [[ 95.1617 , 30.8902 , 95.1668 , 30.8882 , 95.1766 , 30.8939 , 95.1696 , 30.8996 ]];

varpolygonEntity=webGlobe.appendHolePolygonOnTerrain("ÒÀ¸½µØÐδø¶´Çø",latLon_out,lanLon_in,10,

function(entities){

});

appendLine( name,pointsArray,width,color,isGround,options ) ¡ú Entity

Ìí¼ÓÏߣ¬ÈôisGroundΪtrue£¬ÔòpointsArrayÊý×éÖбØÐëÊÇÈýάµã£¬·ñÔòΪ¶þάµã

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

name

string

Ãû³Æ

pointsArray

Array

×é³ÉÏߵĵãÊý×é

width

Number

Ïß¿í

color [optional]

Color

ÏßÑÕÉ«

isGround [optional]

Boolean

ÊÇ·ñÌùµØ£¨¿Éʶ±ð´ø¸ß¶ÈµÄ×ø±ê£©

options [optional]

object

°üº¬µÄ¸½¼ÓÊôÐÔ

ʾÀý£º

vararrayp= [ 104.0 , 28.0 , 1000 ,

                106.0 , 27.0 , 1000 ,

                107.0 , 28.0 , 2000 ,

                108.0 , 29.0 , 3000 ];

var isGround = true;//º¬ZֵΪtrue,·ñÔòΪfalse

varlineByPoints=webGlobe.appendLine('²»ÌùµØÏß',arrayp, 2 ,newCesium.Color( 1 , 0 , 0 , 0.8 ),isGround, {});

appendLineOnTerrain( name,pointsArray,step,level,onsuccess,options )

Ìí¼Ó¿ÉÒÀ¸½ÓÚµØÐεÄÏß

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

name

string

Ãû³Æ

pointsArray

Array

×é³ÉÏߵĶþάµãÊý×é

step

Number

ÀëÉ¢²½³¤

level

Number

µØÐ춱ð

onsuccess

Function

Ìí¼Ó³É¹¦ºóµÄ»Øµ÷º¯Êý

ʾÀý£º

varpointsArray= [ 104.0 , 28.0 ,

                        106.0 , 27.0 ,

                        107.0 , 28.0 ,

                        108.0 , 29.0 ];

webGlobe.appendLineOnTerrain("ÌùµØÏß",pointsArray, 0.1 , 100 ,function(polyline) {

                        console.log(polyline);

                    });

appendGroundPolygon( outPnts,inerPnts,color )

¸ù¾Ý¸ø¶¨µã»­ÌùµØ¶à±ßÐÎ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

outPnts

Array

¶þάÍâȦ×ø±ê£¬Ë³Ê±Õ루¾­Î³¶È£©

inerPnts

Array

¶þάÄÚȦ×ø±ê£¬Ë³Ê±Õ룬´«null±íʾ²»»á»æÖÆ´ø¶´Çø£¨¾­Î³¶È£©

color

Color

Ìî³äÑÕÉ«(ĬÈϲ»Ö¸¶¨Ê±ÎªÀ¶É«) ͨ¹ýgetColor(red, green, blue, alpha)

ʾÀý£º

varlatLon_out= [ 95.1550 , 30.8902 , 95.1668 , 30.8800 , 95.1836 , 30.8902 , 95.1696 , 30.91] ;

varlanLon_in= [[ 95.1617 , 30.8902 , 95.1668 , 30.8882 , 95.1766 , 30.8939 , 95.1696 , 30.8996 ]];

varcolor=newCesium.ColorGeometryInstanceAttribute( 0.0 , 1.0 , 1.0 , 0.5 );

varprimitive=webGlobe.appendGroundPolygon(latLon_out,lanLon_in,color);

appendGroundLine( pnts,color ) ¡úObject

Ìí¼ÓÌùµØÏߣ¬Ïß¿íÎÞ·¨ÉèÖÃ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

pnts

Array.<Number>

×é³ÉÏߵĶþά×ø±êÊý×é

color

Color

ÇøÑÕÉ«

ʾÀý£º

var arrayp = [104.0, 28.0, 106.0, 27.0, 107.0, 28.0, 108.0, 29.0];
var color = new Cesium.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5);

varlineEntity=webGlobe.appendGroundLine(arrayp,color);

appendPopUp( containID,content,position,offset,closeCallback, PopupOptions ) ¡úËæ»úÉú³ÉµÄPopupID{string}

Ìí¼ÓPopup±ê×¢¡£Ð迼ÂÇÏà»úµÄ¸ß¶È¶ÔPopUp´óС¡¢Í¸Ã÷¶È¡¢Æ«ÒÆÖµµÄÓ°Ïì

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

containID

string

ÈÝÆ÷divµÄid£¨×¢Òâ¸ÃÈÝÆ÷²»ÄÜ·ÅÔÚÇòÈÝÆ÷ÖУ©

content

string

popupÖеÄÄÚÈÝ£¬¿ÉÒÔΪ´øhtml±êÇ©µÄ×Ö·û´®

position

Cartesian3

popupµÄλÖ㨵Øͼµ¥Î»£©

offset [optional]

Array

Æ«ÒÆÖµ£¬ÏñËص¥Î»

closeCallback

Function

popupµÄclose°´Å¥µã»÷»Øµ÷º¯Êý

PopupOptions [optional]

object

Popup²ÎÊýJSON¶ÔÏó

ʾÀý£º

webGlobe.AppendPopUp('popup', '²âÊÔ1 <br/>²âÊÔ2<br/>', new Cesium.Cartesian3(114.5, 32.5, 0
), [0, 0], webGlobe.removePopUp);

refreshPopUps()

Ë¢ÐÂPopup±ê×¢

updatePopups()

¸üÐÂPopup±ê×¢

removePopUp( popID)

¸ù¾ÝIDɾ³ýÖ¸¶¨Popup

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

popID

string

popupËùÔÚÈÝÆ÷divµÄid

clearPopUps()

Çå³ýËùÓÐPopup

removeEntity( entity )

ÒƳýÖ¸¶¨ÊµÌå

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

entity

Entity

ÒªÒƳýµÄʵÌå¶ÔÏó

removeAllEntities()

ÒƳýËùÓÐʵÌå

removeAllPrimitives()

ÒƳýÈ«²¿ÊµÌå

ÊÓͼ¿ØÖƽӿÚ

setView( lon,lat,height,curHeading,curPitch,curRoll )

ÉèÖõ±Ç°ÊÓͼ·¶Î§

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

lon

Number

¾­¶È

lat

Number

γ¶È

height

Number

¸ß³Ì

curHeading

Number

ÈÆ´¹Ö±ÓÚµØÐĵÄÖáÐýתµÄ¶ÈÊý

curPitch

Number

ÈÆγ¶ÈÏßÐýת¶ÈÊý

curRoll

Number

Èƾ­¶ÈÏßÐýת¶ÈÊý

ʾÀý£º

webGlobe.setView( 114.3 , 30.4 , 10000 , 30 , -20 , 60 );

Icrf()

 

openRotation()

¿ªÆôµØÇò×Ôת

closeRotation()

¹Ø±ÕµØÇò×Ôת

goHome()

¸´Î»

changeSceneMode( sceneMode ,duration )

Çл»³¡¾°Ä£Ê½

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

sceneMode

string

³¡¾°Ä£Ê½¡£'3D', '2D','COLUMBUS_VIEW'(ƽÃæÈýά)

duration

Number

¶¯»­³ÖÐøʱ¼ä£¬µ±duration <=0ʱ£¬±£³Ö³¡¾°·¶Î§²»±ä

ʾÀý£º

webGlobe.changeSceneMode('COLUMBUS_VIEW', 3 );

zoomOut()

ÊÓͼ·Å´ó

zoomIn()

ÊÓͼËõС

changeSkybox( skybox )

Ð޸ij¡¾°Ìì¿ÕºÐ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

skybox

SkyBox

Ìì¿ÕºÐ¶ÔÏó

ʾÀý£º

var skyBox = new Cesium.SkyBox({

                        sources: {

                             positiveX:'skybox_px.png',

                            negativeX:'skybox_nx.png',

                            positiveY:'skybox_py.png',

                            negativeY:'skybox_ny.png',

                            positiveZ:'skybox_pz.png',

                            negativeZ:'skybox_nz.png'

                        }

                    });

webGlobe.changeSkyBox(skyBox);

ShowPosition ( elementId, options )

ÏÔʾ¾­Î³¶È ¸ß³Ì ÊӽǸ߶È

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

elementId

Element | String

ÒªÏÔʾµÄdivµÄid

options

Object

¸½¼ÓÊôÐÔ

ÊôÐÔÃû³Æ

ÀàÐÍ

ĬÈÏÖµ

ÃèÊö

showHpr

Boolean

false

 

showSelectTileInfo

Boolean

false

ÏÔʾµ±Ç°Êó±êËùÔÚλÖÃÊ°È¡µ½µÄ¼¶±ð

showViewLevelInfo

Boolean

false

ÏÔʾÊÓͼ¼¶±ð

ʾÀý£º

webGlobe.showPosition('', {

       showHpr: true,

       showSelectTileInfo:true,

       showViewLevelInfo:true

});

FlyTo£¨lan, lon, height, duration £©

Ìøתµ½

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

lan

Number

¾­¶È

lon

Number

γ¶È

height

Number

ÊӽǸ߶È

duration

Number

Ìøת³ÖÐøʱ¼ä

flyToEx£¨lan, lon, options£©

Ìøתµ½

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

lan

Number

¾­¶È

lon

Number

γ¶È

options

Object

Ìøת³ÖÐøʱ¼ä [optional]

ÊôÐÔÃû³Æ

ÀàÐÍ

ÃèÊö

height

Number

 

duration

Number

 

heading

Number

·½Î»½Ç

pitch

Number

¸©Ñö½Ç

roll

Number

·­¹ö½Ç

ͨÓÃÀ©Õ¹½Ó¿Ú

createNavigationTool( options ) ¡úPosition

´´½¨µ¼º½¿Ø¼þ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

options

object

µ¼º½¿Ø¼þ²ÎÊý¡£

example £ºvar options = {}; //ÓÃÓÚÔÚʹÓÃÖØÖõ¼º½ÖØÖõØͼÊÓͼʱÉèÖÃĬÈÏÊÓͼ¿ØÖÆ¡£½ÓÊܵÄÖµÊÇCesium.CartographicºÍ Cesium.Rectangle options.defaultResetView = Cesium.Rectangle.fromDegrees(71, 3, 90, 14);

//ÓÃÓÚÆôÓûò½ûÓÃÂÞÅÌ

options.enableCompass= true;

//ÓÃÓÚÆôÓûò½ûÓÃËõ·Å¿Ø¼þ

options.enableZoomControls= false;

//ÓÃÓÚÆôÓûò½ûÓþàÀëͼÀý

options.enableDistanceLegend= false;

//ÓÃÓÚÆôÓûò½ûÓÃÖ¸ÄÏÕëÍâ»·

options.enableCompassOuterRing= true;

ʾÀý£º

webGlobe.createNavigationTool({ enableCompass: true, enableZoomControls: true, 
enableDistanceLegend: true });

appendEntityWithVideo( videoContainID,geomGraphic,options ) ¡ú Entity

Ìí¼Ó´øÊÓƵµÄ¼¸ºÎʵÌå

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

videoContainID

string

ÊÓƵ£¨video£©µÄdomÔªËØid

geomGraphic

PolygonGraphics

¶à±ßÐÎͼÐβÎÊý

options

object

²ÄÖʲÎÊý

outputImage( fileName )

Êä³öÆÁÄ»½Øͼ£¬ÐèҪͬreming.jsÒ»ÆðʹÓÃ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

filename

string

Êä³öͼƬµÄ±£´æµØÖ·

getHeightFromDegrees( lon,lat ) ¡ú height{Number}

¸ù¾Ý¾­Î³¶È¼ÆËã¸ß³Ì

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

lon

Number

¾­¶È

lat

Number

γ¶È

ʾÀý£º

webGlobe.getHeightFromDegrees( 114.3 , 30.4 );

getColor( red,green,blue,alpha ) ¡ú Color

»ñÈ¡ÑÕÉ«¶ÔÏó

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

red

Number

ºìÉ«·ÖÁ¿£¬È¡Öµ0-1.0

green

Number

ÂÌÉ«·ÖÁ¿£¬È¡Öµ0-1.0

blue

Number

À¶É«·ÖÁ¿£¬È¡Öµ0-1.0

alpha

Number

͸Ã÷¶È£¬È¡Öµ0-1.0

createHeatMap( bounds, maxValue, minValue, data ) ¡ú object ÈÈÁ¦Í¼ÊµÀý

´´½¨²¢Ìí¼ÓÈÈÁ¦Í¼

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

bounds

object

ÈÈÁ¦Í¼·¶Î§²ÎÊýJSON¶ÔÏó

maxValue

Number

×î´óÖµ

minValue

Number

×îСֵ

data

object

¹¹½¨ÈÈÁ¦Í¼µÄÊý¾ÝJSON¶ÔÏó

ʾÀý£º

var bounds = {
                   west: 147.13833844,

                    east: 147.13856899 ,

                   south: -41.43606916 ,

                   north: -41.43582929

              };

var data = [{ "x": 147.1383442264, "y": -41.4360048372, "value": 76 }, 
{ "x": 147.1384363011, "y": -41.4360298848,"value": 63 }, 
{ "x": 147.138368102, "y": -41.4358360603, "value": 1 }, 
{ "x": 147.1385627739, "y": -41.4358799123, "value": 21 }, 
{ "x": 147.1385138501, "y": -41.4359327669, "value": 28 }, 
{ "x": 147.1385031219, "y": -41.4359730105, "value": 41 }, 
{ "x": 147.1384127393, "y": -41.435928255, "value": 75 }, 
{ "x": 147.1384551136, "y": -41.4359450132, "value": 3 }, 
{ "x": 147.1384927196, "y": -41.4359158649, "value": 45 }, 
{ "x": 147.1384938639, "y": -41.4358498311, "value": 45 }, 
{ "x": 147.1385183299, "y": -41.4360213794, "value": 93 },
{ "x": 147.1384007925, "y": -41.4359860133, "value": 46 }, 
{ "x": 147.1383604844, "y": -41.4358298672, "value": 54 }, 
{ "x": 147.13851025, "y": -41.4359098303, "value": 39 }, 
{ "x": 147.1383874733, "y": -41.4358511035, "value": 34 }, 
{ "x": 147.1384981796, "y": -41.4359355403, "value": 81 }, 
{ "x": 147.1384504107, "y": -41.4360332348, "value": 39 }, 
{ "x": 147.1385582664, "y": -41.4359788335, "value": 20 },
{ "x": 147.1383967364, "y": -41.4360581999, "value": 35 }, 
{ "x": 147.1383839615, "y": -41.436016316, "value": 47 }, 
{ "x": 147.1384082712, "y": -41.4358423338, "value": 36 }, 
{ "x": 147.1385092651, "y": -41.4358577623, "value": 69 }, 
{ "x": 147.138360356, "y": -41.436046789, "value": 90 }, 
{ "x": 147.138471893, "y": -41.4359184292, "value": 88 }, 
{ "x": 147.1385605689, "y": -41.4360271359, "value": 81 }, 
{ "x": 147.1383585714, "y": -41.4359362476, "value": 32 },
{ "x": 147.1384939114, "y": -41.4358844253, "value": 67 }, 
{ "x": 147.138466724, "y": -41.436019121, "value": 17 }, 
{ "x": 147.1385504355, "y": -41.4360614056, "value": 49 }, 
{ "x": 147.1383883832, "y": -41.4358733544, "value": 82 }, 
{ "x": 147.1385670669, "y": -41.4359650236, "value": 25 }, 
{ "x": 147.1383416534, "y": -41.4359310876, "value": 82 }, 
{ "x": 147.138525285, "y": -41.4359394661, "value": 66 }, 
{ "x": 147.1385487719, "y": -41.4360137656, "value": 73 }, 
{ "x": 147.1385496029, "y": -41.4359187277, "value": 73 }, 
{ "x": 147.1383989222, "y": -41.4358556562, "value": 61 }, 
{ "x": 147.1385499424, "y": -41.4359149305, "value": 67 }, 
{ "x": 147.138404523, "y": -41.4359563326, "value": 90 }, 
{ "x": 147.1383883675, "y": -41.4359794855, "value": 78 },
{ "x": 147.1383967187, "y": -41.435891185, "value": 15 }, 
{ "x": 147.1384610005, "y": -41.4359044797, "value": 15 }, 
{ "x": 147.1384688489, "y": -41.4360396127, "value": 91 }, 
{ "x": 147.1384431875, "y": -41.4360684409, "value": 8 }, 
{ "x": 147.1385411067, "y": -41.4360645847, "value": 42 }, 
{ "x": 147.1385237178, "y": -41.4358843181, "value": 31 }, 
{ "x": 147.1384406464, "y": -41.4360003831, "value": 51 }, 
{ "x": 147.1384679169, "y": -41.4359950456, "value": 96 },
{ "x": 147.1384194314, "y": -41.4358419739, "value": 22 }, 
{ "x": 147.1385049792, "y": -41.4359574813, "value": 44 }, 
{ "x": 147.1384097378, "y": -41.4358598672, "value": 82 }, 
{ "x": 147.1384993219, "y": -41.4360352975, "value": 84 }, 
{ "x": 147.1383640499, "y": -41.4359839518, "value": 81 }];
var valueMin = 0;
var valueMax = 100;

varinstance=webGlobe.createHeatMap(bounds,valueMin,valueMax, data);

getSceneRang() ¡ú Array.<Array>

»ñÈ¡³¡¾°µÄ¶þάÊÓͼ·¶Î§

cruiseModel( modelURL,positionArr,isShowPath,clockFrequency ) ¡ú Array

Ìí¼ÓÄ£ÐÍÂþÓÎ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

modelURL

string

Ä£ÐÍURL

positionArr

Array.<Array>

ÂþÓÎÏß·½Úµã×ø±êÊý×é

isShowPath [optional]

Boolean

ÊÇ·ñÏÔʾÏß·ºÍ½Úµã£¬Ä¬ÈÏΪtrue

clockFrequency [optional]

Number

ÂþÓÎÒ»´ÎµÄʱ¼ä£¨µ¥Î»£ºÃ룩£¬Ä¬ÈÏ10Ãë

ʾÀý£º

var positionArr = [];

for(vari= 0 ;i<= 360 ;i+= 45 ) {

varradians=Cesium.Math.toRadians(i);

        positionArr.push([ -112.0924 + (0.03* 1.5 *Math.cos(radians)), 36.1476 + ( 0.03 *Math.sin(radians))]);

}

var modelEntity = webGlobe.cruiseModel('../data/model/fengji/donghua.gltf', positionArr, 
true, 50);

webGlobe.viewer.zoomTo(modelEntity,newCesium.HeadingPitchRange(0,Cesium.Math.toRadians(-90
)));

webGlobe.startCruiseModel();

clearCruiseModel( modelEntities )

ɾ³ýÄ£ÐÍÂþÓÎ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

modelEntities

[ Entity ]

ÂþÓÎÄ£ÐÍÊý×飬ΪÌí¼ÓÄ£ÐÍÂþÓκ󷵻صÄÖµ

startCruiseModel()

¿ªÊ¼Ä£ÐÍÂþÓÎ

stopCruiseModel()

ֹͣģÐÍÂþÓÎ

rotationView( type, options ) ¡ú Function

ÈƵãÐýת£¬Ïà»úÈƵã·ÉÐÐÒ»ÖÜ»òÕßÏà»úÈÆ×ÔÉíÐýתһÖÜ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

type

string

ÐýתÀàÐÍ£¬Ä¬ÈÏÈÆÏà»ú×ÔÉíÐýת£¬Ä¬ÈÏÖµ'rotationAroundPos'

options

object

Ïà»úÐýתµÄ²ÎÊýJSON¶ÔÏó

 

ÊôÐÔ

ÀàÐÍ

ĬÈÏÖµ

ÃèÊö

position

Cartesian3

 

optionalÒª½øÐÐΧÈÆÐýתµÄµã

pitch

Number

30

optionalÏà»úµÄ¸©Ñö½Ç£¬µ¥Î»£¨¶È£©

distance

Number

1000

optionalÏà»ú¾àÀëµãµÄ¾àÀ룬µ¥Î»£¨Ã×£©

duration

Number

10

optionalÈƵã·ÉÐÐÒ»ÖÜËùÓõÄʱ¼ä£¬µ¥Î»£¨Ã룩

ClockRange

Number

Cesium.ClockRange.CLAMPED

optionalÑ­»··½Ê½

 

ʾÀý£º

webGlobe.rotationView("rotationAroundPos",{position:new Cesium.Cartesian3(114,30,100)});

webGlobe.startRotationAroundPos();

startRotationAroundPos()

¿ªÊ¼ÈƵãÐýת

pauseRotationView()

ÔÝÍ£ÈƵãÐýת

removeRotationView( event )

ÒƳýÈƵãÐýתʼþ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

event

Function

Ðýתʼþº¯Êý£¬ÓÉ rotationView ·½·¨·µ»Ø

showTileGrid(isVisible)

ÏÔʾÍßƬÍø¸ñÐÅÏ¢

²ÎÊýÃû³Æ

ÀàÐÍ

ÃèÊö

isVisible

Boolean

ÊÇ·ñ¿É¼û

caculHeadingFromCartographic (center, target)  ¡ú  Number

¼ÆËãÁ½µã¼äµÄheading º½Ïò½Ç

²ÎÊýÃû³Æ

ÀàÐÍ

ÃèÊö

center

Cartographic

ÖÐÐĵ㠣¨µÚÒ»¸öµã£© ×ø±êΪ»¡¶È

target

Cartographic

Ä¿±êµã £¨µÚ¶þ¸öµã£©×ø±êΪ»¡¶È

getHeadingFromCartesian3 (center, target)  ¡ú  Number

¼ÆËãÁ½µã¼äµÄheading º½Ïò½Ç

²ÎÊýÃû³Æ

ÀàÐÍ

ÃèÊö

center

Cartesian3

ÖÐÐĵ㠣¨µÚÒ»¸öµã£©

target

Cartesian3

Ä¿±êµã £¨µÚ¶þ¸öµã£©

createDynamicCutting (tileSet, planes)

²ÎÊýÃû³Æ

ÀàÐÍ

ÃèÊö

tileSet

Object

 

planes

Object

 

startCustomDisplay (layerList, idList, options)

²ÎÊýÃû³Æ

ÀàÐÍ

ÃèÊö

layerList

Array.<layer>

ͼ²ãÁбí

idList

Array.<id>

idÁбí

options

Object

À©Õ¹ÊôÐÔ

 

 

ÊôÐÔ

ÀàÐÍ

ĬÈÏÖµ

ÃèÊö

color

Color

new Cesium.Color(1.0,0,0,0.5)

optional¸ßÁÁÑÕÉ«

negate

Color

true

optional ÊÇ·ñÈ¡·´ ¡ª¡ªÒâ˼ÊdzýÁËidÁбíÖеÄÒªËØÓ¦ÓÃcolor

negateColor

Color

new Cesium.Color.WHITE

optional È¡·´µÄÑÕÉ« Ö»ÓÐÔÚnegate=trueµÄʱºò²ÅÆð×÷ÓÃ

style

String

'EdgeHighlight'

optional ¸ßÁÁģʽ//'EdgeHighlight'¸ßÁÁ+Ãè±ß 'Edge'//Ãè±ß

edgeColor

Color

new Cesium.Color(0, 0, 1,1.0)

optionalĬÈϺìÉ«

stopCustomDisplay ()

ֹͣȫ²¿¸ßÁÁ

stopCustomDisplayByIds ()

¸ù¾ÝidÍ£Ö¹¸ßÁÁ

 

flyToComm£¨lan, lon, height, options £©

ͨÓÃÌøת½Ó¿Ú

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

lan

Number

¾­¶È

lon

Number

γ¶È

height

Number

ÊӽǸ߶È

options

Object

À©Õ¹²ÎÊý ¼æÈÝÔ­Éú

zoomToM3dLayer£¨layer £©

Ëõ·Åµ½Í¼²ã

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

layer

Object

 

 

Êó±êʼþ½Ó¿Ú

registerMouseEvent( MouseEventType , callbackFun, handler ) ¡ú handler

×¢²áÊó±êʼþ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

MouseEventType

string

Êó±êʼþÀàÐÍ¡£ LEFT_CLICK RIGHT_CLICK MOUSE_MOVE LEFT_DOUBLE_CLICK RIGHT_DOUBLE_CLICK WHEEL( Êó±ê¹öÂÖ)

callbackFun

Function

Êó±êʼþ´¥·¢µÄ»Øµ÷º¯Êý

handler

Object

»Øµ÷º¯Êý

Returns£ºÊ¼þ¾ä±ú

unRegisterMouseEvent( MouseEventType ) ¡ú handler

×¢ÏúÊó±êʼþ

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

MouseEventType

string

Êó±êʼþÀàÐÍ

×ø±êת»»½Ó¿Ú

screenPositionToCartographic( position ) ¡ú Position

ÆÁÄ»×ø±êתΪ¾­Î³¶È×ø±ê

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

position

Position

ÆÁÄ»×ø±êµã

Returns £ºÈýά¾­Î³¶È×ø±êµã(µ¥Î»»¡¶È)

screenPositionToCartesian( position ) ¡ú Position

ÆÁÄ»×ø±êתµÑ¿¨¶û×ø±ê

²ÎÊýÃû³Æ

²ÎÊýÀàÐÍ

ÃèÊö

position

Position

ÆÁÄ»×ø±êµã

Returns£ºÈýάµÑ¿¨¶û×ø±êµã