Parameters 如果指定了参数,OpenLayers.Control.Scale将失败

Parameters 如果指定了参数,OpenLayers.Control.Scale将失败,parameters,controls,scale,openlayers,Parameters,Controls,Scale,Openlayers,在OpenLayers 2.13.1中,map.addControl(新的OpenLayers.Control.Scale({geodesic:true}));如果未指定任何参数,则失败(比例在地图中不可见),比例控制正常 有人有这个问题吗 关于,Alen构造函数采用2个参数 第一个参数必须是DOM元素。 第二个参数是options对象 OpenLayers.Control.Scale($('scaleDiv'), { geodesic: true })

在OpenLayers 2.13.1中,map.addControl(新的OpenLayers.Control.Scale({geodesic:true}));如果未指定任何参数,则失败(比例在地图中不可见),比例控制正常

有人有这个问题吗

关于,Alen

构造函数采用2个参数

第一个参数必须是DOM元素。 第二个参数是options对象

OpenLayers.Control.Scale($('scaleDiv'), { geodesic: true })