首页 / 浏览问题 / WebGIS / 问题详情
iClient for OpenLayers开发指南中的矢量瓦片中的部分代码
17EXP 2023年01月24日

源码地址:矢量瓦片 (supermap.io)

问题:请问黄色代码部分的API在超图的哪个网址呢?这一部分看不太懂。

map.on('click', function (e) {

            map.forEachFeatureAtPixel(e.pixel, function (feature) {               

                vectorTileStyles.dispatchEvent({type: 'featureSelected',

                    selectedId: feature.getProperties().id,

                    layerName: feature.getProperties().layerName

                });

                return true;

            }, {hitTolerance: 5});

            vectorLayer.changed();

        })

1个回答

您好!这是我们iClient for OpenLayers产品API地址:https://iclient.supermap.io/web/apis/openlayers.html。您可以直接在上面搜索vectorTileStyles查看相关属性与方法

希望可以帮助到您!

1,422EXP 2023年01月28日
...