MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / fun

Function fun

src/openlayers/core/MapExtend.js:13–26  ·  view source on GitHub ↗
(layer, coordinate, resolution, callback, pixel, e)

Source from the content-addressed store, hash-verified

11 */
12export var MapExtend = function () {
13 const fun = function (layer, coordinate, resolution, callback, pixel, e) {
14 if (layer instanceof LayerGroup) {
15 layer.getLayers().forEach(function (subLayer) {
16 fun(subLayer, coordinate, resolution, callback, pixel, e)
17 });
18 } else {
19 //当前高效率点图层满足筛选条件/并且可视时,可被选中:
20 if (layer.getSource()._forEachFeatureAtCoordinate) {
21 layer.getSource()._forEachFeatureAtCoordinate(coordinate, resolution, (feature) => {
22 callback(feature, layer)
23 }, pixel, e);
24 }
25 }
26 }
27 olMap.prototype.forEachFeatureAtPixelDefault = olMap.prototype.forEachFeatureAtPixel;
28
29 olMap.prototype.forEachFeatureAtPixel = olMap.prototype.Tc = function (pixel, callback, opt_options, e) {

Callers 6

Color.jsFile · 0.85
mapMethod · 0.85
iterShapeMethod · 0.85
MapExtend.jsFile · 0.85
mapv.jsFile · 0.85
_loopFunction · 0.85

Calls 5

forEachMethod · 0.80
callbackFunction · 0.50
getLayersMethod · 0.45
getSourceMethod · 0.45

Tested by

no test coverage detected