首页 / 浏览问题 / WebGIS / 问题详情
点击事件添加marker点位,怎么实现marker点位拖动?
1EXP 2020年08月04日
使用dragFeature控件,具体需要这么做呢,实现了很久没弄出来,初学者

1个回答

您好,您应该是使用的是classic的地图框架吧,我这边测试        var point = new SuperMap.Geometry.Point(0, 0);
        pointFeature = new SuperMap.Feature.Vector(point);
        pointFeature.style = {
       
            pointRadius:50,
            externalGraphic:'https://iclient.supermap.io/examples/classic/images/marker-gold.png'
        };
        vectorlayer.addFeatures(pointFeature);
        var dragFeature = new SuperMap.Control.DragFeature(vectorlayer);
//map上添加控件
map.addControl(dragFeature);
//激活控件
dragFeature.activate();是可以进行正常移动的您也可以在官网实例进行按照我的方式进行修改然后运行
3,352EXP 2020年08月04日
非常感谢,搞定了
...