Class: EarthCompass

CMAP.EarthCompass(param)

EarthCompass 指北针控件

Constructor

new EarthCompass(param)

构造函数
Parameters:
Name Type Description
param Object 参数列表
Properties
Name Type Description
useElement Boolean 使用dom元素实现指北针 dom元素中可自定义指北针图片以及位置
element DOMElenent 使用的dom元素
rotateToNorthSpeed Number 指北针复位的速度
image String 使用的指北针图片的url useElement为true时无效
offset Array 位置偏移 useElement为true时无效
position Number 初始化位置 THING.CornerType.RightTop、THING.CornerType.RightBottom、THING.CornerType.LeftTop、THING.CornerType.LeftBottom useElement为true时无效
Author:
Example
var compass = app.addControl(new THING.EarthCompass({
  'image': 'https://speech.uinnova.com/static/images/compass.png',
  'offset': [50, 50],//选填 偏移值 x y  默认值 25
  'position': THING.CornerType.RightTop //选填 默认值 RightBottom
}));

Extends

  • THING.CompassControl