Skip to content

Commit 47eda51

Browse files
committed
fix turf分析结果默认会自动添加到图层的问题
1 parent 575ced3 commit 47eda51

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

dist/iclient9-leaflet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32080,7 +32080,7 @@ var TurfLayer = exports.TurfLayer = _leaflet2["default"].GeoJSON.extend({
3208032080
*/
3208132081
process: function process(type, args, callback, addFeaturesToMap) {
3208232082
var result = _turf2["default"][type.split('.')[1]].apply(this, this.parse(type, args));
32083-
addFeaturesToMap = addFeaturesToMap || true;
32083+
addFeaturesToMap = addFeaturesToMap == null ? true : addFeaturesToMap;
3208432084
if (addFeaturesToMap) {
3208532085
this.addData([result]);
3208632086
}

dist/iclient9-leaflet.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/iclient9-openlayers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28857,7 +28857,7 @@ var Turf = function (_ol$source$Vector) {
2885728857
}
2885828858
return;
2885928859
}
28860-
addFeaturesToMap = addFeaturesToMap || true;
28860+
addFeaturesToMap = addFeaturesToMap == null ? true : addFeaturesToMap;
2886128861
if (addFeaturesToMap) {
2886228862
this.addFeatures(features);
2886328863
}

dist/iclient9-openlayers.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/leaflet/overlay/TurfLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export var TurfLayer = L.GeoJSON.extend({
160160
*/
161161
process: function (type, args, callback, addFeaturesToMap) {
162162
var result = turf[type.split('.')[1]].apply(this, this.parse(type, args));
163-
addFeaturesToMap = addFeaturesToMap || true;
163+
addFeaturesToMap = addFeaturesToMap == null ? true : addFeaturesToMap;
164164
if (addFeaturesToMap) {
165165
this.addData([result]);
166166
}

src/openlayers/overlay/Turf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export default class Turf extends ol.source.Vector {
172172
}
173173
return;
174174
}
175-
addFeaturesToMap = addFeaturesToMap || true;
175+
addFeaturesToMap = addFeaturesToMap == null ? true : addFeaturesToMap;
176176
if (addFeaturesToMap) {
177177
this.addFeatures(features);
178178
}

0 commit comments

Comments
 (0)