首页 / 浏览问题 / WebGIS / 问题详情
classic 矢量图层添加的Geometry.Rectangle能否固定大小
25EXP 2020年08月05日

classic 矢量图层添加的Geometry.Rectangle能否固定大小,不随地图缩放而改变大小?

目前是地图缩小后,矢量图形也会缩小,我希望能固定大小,不受地图缩放影响。

部分实现代码如下

var point = new SuperMap.Geometry.Rectangle(116.39129, 39.90679, 0.0025, 0.0015);
pFeature = new SuperMap.Feature.Vector(point);
pFeature.style = {
        strokeColor: "#f00",
        fillColor: "blue",
        strokeWidth: 3,
        fillOpacity: 1,
        pointRadius: 20

    };
vectorlayer.addFeatures(pFeature);

1个回答

您好,目前Geometry.Rectangle是没有支持您所说的相对于map挂载div是静止的功能。您可以参考https://iclient.supermap.io/examples/classic/editor.html#theme_themeLabelLayer该范例,只加入单个标签的形式,并且不设置lable的方式

3,352EXP 2020年08月05日
...