Skip to content

Commit 5f0d488

Browse files
修复leaflet turf 示例,更新示例enhance 地址
1 parent a75d395 commit 5f0d488

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

dist/mapboxgl/include-mapboxgl.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
inputScript(libsurl + '/mapbox-gl-js/1.13.2/mapbox-gl.js');
6060
}
6161
if (inArray(includes, 'mapbox-gl-enhance')) {
62-
inputCSS(libsurl + '/mapbox-gl-js-enhance/1.12.1-8/mapbox-gl-enhance.css');
63-
inputScript(libsurl + '/mapbox-gl-js-enhance/1.12.1-8/mapbox-gl-enhance.js');
62+
inputCSS(libsurl + '/mapbox-gl-js-enhance/1.12.1-9/mapbox-gl-enhance.css');
63+
inputScript(libsurl + '/mapbox-gl-js-enhance/1.12.1-9/mapbox-gl-enhance.js');
6464
}
6565
if (inArray(includes, 'L7')) {
6666
inputScript(libsurl + '/mapboxgl-l7-render/0.0.2/mapboxgl-l7-render.js');

dist/maplibregl/include-maplibregl.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
inputScript(libsurl + '/maplibre-gl-js/4.3.2/maplibre-gl.min.js');
6060
}
6161
if (inArray(includes, 'maplibre-gl-enhance')) {
62-
inputCSS(libsurl + '/maplibre-gl-js-enhance/4.3.0-4/maplibre-gl-enhance.css');
63-
inputScript(libsurl + '/maplibre-gl-js-enhance/4.3.0-4/maplibre-gl-enhance.js');
62+
inputCSS(libsurl + '/maplibre-gl-js-enhance/4.3.0-5/maplibre-gl-enhance.css');
63+
inputScript(libsurl + '/maplibre-gl-js-enhance/4.3.0-5/maplibre-gl-enhance.js');
6464
}
6565
if (inArray(includes, 'L7')) {
6666
inputScript(libsurl + '/maplibregl-l7-render/0.0.2/maplibregl-l7-render.js');

examples/leaflet/imageService.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ <h4 class="modal-title" id="myModalLabel"></h4>
464464
}
465465

466466
function drawCompleted(e) {
467-
var bounds = e.layer._bounds;
467+
var bounds = e.layer.getBounds();
468468
var _northEast = bounds._northEast;
469469
var _southWest = bounds._southWest;
470470
plotBbox = [_southWest.lng, _southWest.lat, _northEast.lng, _northEast.lat];

examples/leaflet/turf_gridAnalysis.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201

202202
function mapDrawListener(e) {
203203
var layer = e.layer;
204-
var layerBounds = layer._bounds;
204+
var layerBounds = layer.getBounds();
205205
if (!bounds.contains(layerBounds)) {
206206
widgets.alert.showAlert(resources.msg_beyondScope, false);
207207
return;

src/leaflet/core/Base.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,13 @@ L.GeoJSON.include({
126126
layer.feature = L.GeoJSON.asFeature(geojson);
127127

128128
layer.defaultOptions = layer.options;
129-
var defaultGeometryOptions = this.defaultGeometryOptions[geometry.type];
130-
if (defaultGeometryOptions) {
131-
layer.commonOptions = Object.assign({}, defaultGeometryOptions);
132-
} else {
133-
this.defaultGeometryOptions[geometry.type] = L.Util.extend({}, layer.defaultOptions);
129+
if (this.defaultGeometryOptions) {
130+
var defaultGeometryOptions = this.defaultGeometryOptions[geometry.type];
131+
if (defaultGeometryOptions) {
132+
layer.commonOptions = Object.assign({}, defaultGeometryOptions);
133+
} else {
134+
this.defaultGeometryOptions[geometry.type] = L.Util.extend({}, layer.defaultOptions);
135+
}
134136
}
135137
this.resetStyle(layer);
136138

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy