首页 / 浏览问题 / 云GIS / 问题详情
地图发布到iserver后,调用地图的人如何实现在地图上的点位放一张图片。
41EXP 2020年04月30日
地图发布到iserver后,调用地图的人如何实现在地图上的点位放一张图片。有没有相关代码

1个回答

您好,请您说下您那边选择的地图框架,每个地图框架都能实现,具体的您可以在百度查下。

我以iclient for openlayer为例       

point = new ol.geom.Point([104, 30]);
        var iconStyle = new ol.style.Style({
            image: new ol.style.Icon(({
                src: '../img/markerbig_select.png'
            }))
        });
        var feature = new ol.Feature(point);
        feature.setStyle(iconStyle);
        var pointSource = new ol.source.Vector({
            features: [feature],
            wrapX: false
        });
        vectorLayer = new ol.layer.Vector({
            source: pointSource
        });
        map.addLayer(vectorLayer);
3,352EXP 2020年04月30日
地图框架只。。。?只调用地图服务可以实现吗,是否需要调用数据服务或其他服务。
...