Skip to content

Commit 33b0eb8

Browse files
committed
【fix修复GeoJSON对Text类型的解析 fix CI
1 parent 04d876e commit 33b0eb8

14 files changed

+453
-450
lines changed

dist/leaflet/iclient9-leaflet-es6.js

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8410,7 +8410,7 @@ class Collection_Collection extends Geometry_Geometry {
84108410
this.addComponents(components);
84118411
}
84128412
this.CLASS_NAME = "SuperMap.Geometry.Collection";
8413-
this.type = "Collection";
8413+
this.geometryType = "Collection";
84148414
}
84158415

84168416
/**
@@ -8643,7 +8643,7 @@ class MultiPoint_MultiPoint extends Collection_Collection {
86438643
*/
86448644
this.componentTypes = ["SuperMap.Geometry.Point"];
86458645
this.CLASS_NAME = "SuperMap.Geometry.MultiPoint";
8646-
this.type = "MultiPoint";
8646+
this.geometryType = "MultiPoint";
86478647
}
86488648

86498649
/**
@@ -8699,7 +8699,7 @@ class Curve_Curve extends MultiPoint_MultiPoint {
86998699
*/
87008700
this.componentTypes = ["SuperMap.Geometry.Point", "SuperMap.PointWithMeasure"];
87018701
this.CLASS_NAME = "SuperMap.Geometry.Curve";
8702-
this.type = "Curve";
8702+
this.geometryType = "Curve";
87038703

87048704
}
87058705

@@ -8757,7 +8757,7 @@ class Point_Point extends Geometry_Geometry {
87578757
*/
87588758
this.type = type || "Point";
87598759
this.CLASS_NAME = "SuperMap.Geometry.Point";
8760-
this.type = "Point";
8760+
this.geometryType = "Point";
87618761
}
87628762

87638763
/**
@@ -8878,7 +8878,7 @@ class LineString_LineString extends Curve_Curve {
88788878
constructor(points) {
88798879
super(points);
88808880
this.CLASS_NAME = "SuperMap.Geometry.LineString";
8881-
this.type = "LineString";
8881+
this.geometryType = "LineString";
88828882
}
88838883

88848884
/**
@@ -9234,7 +9234,7 @@ class GeoText_GeoText extends Geometry_Geometry {
92349234
};
92359235
this.element = document.createElement('span');
92369236
this.CLASS_NAME = "SuperMap.Geometry.GeoText";
9237-
this.type = "GeoText";
9237+
this.geometryType = "GeoText";
92389238
}
92399239

92409240
/**
@@ -9538,7 +9538,7 @@ class LinearRing_LinearRing extends LineString_LineString {
95389538
*/
95399539
this.componentTypes = ["SuperMap.Geometry.Point"];
95409540
this.CLASS_NAME = "SuperMap.Geometry.LinearRing";
9541-
this.type = "LinearRing";
9541+
this.geometryType = "LinearRing";
95429542
}
95439543

95449544
/**
@@ -9658,7 +9658,7 @@ class MultiLineString_MultiLineString extends Collection_Collection {
96589658
*/
96599659
this.componentTypes = ["SuperMap.Geometry.LineString"];
96609660
this.CLASS_NAME = "SuperMap.Geometry.MultiLineString";
9661-
this.type = "MultiLineString";
9661+
this.geometryType = "MultiLineString";
96629662
}
96639663

96649664

@@ -9702,7 +9702,7 @@ class MultiPolygon_MultiPolygon extends Collection_Collection {
97029702
*/
97039703
this.componentTypes = ["SuperMap.Geometry.Polygon"];
97049704
this.CLASS_NAME = "SuperMap.Geometry.MultiPolygon";
9705-
this.type = "MultiPolygon";
9705+
this.geometryType = "MultiPolygon";
97069706
}
97079707

97089708

@@ -9746,7 +9746,7 @@ class Polygon_Polygon extends Collection_Collection {
97469746
*/
97479747
this.componentTypes = ["SuperMap.Geometry.LinearRing"];
97489748
this.CLASS_NAME = "SuperMap.Geometry.Polygon";
9749-
this.type = "Polygon";
9749+
this.geometryType = "Polygon";
97509750
}
97519751

97529752
/**
@@ -9825,7 +9825,7 @@ class Rectangle_Rectangle extends Geometry_Geometry {
98259825
this.height = height;
98269826

98279827
this.CLASS_NAME = "SuperMap.Geometry.Rectangle";
9828-
this.type = "Rectangle";
9828+
this.geometryType = "Rectangle";
98299829
}
98309830

98319831
/**
@@ -12250,6 +12250,7 @@ class Route_Route extends Collection_Collection {
1225012250
}
1225112251

1225212252
this.CLASS_NAME = "SuperMap.Route";
12253+
this.geometryType = "LINEM";
1225312254
}
1225412255

1225512256
/**
@@ -12487,7 +12488,7 @@ class ServerGeometry_ServerGeometry {
1248712488
toGeometry() {
1248812489
var me = this,
1248912490
geoType = me.type;
12490-
switch (geoType) {
12491+
switch (geoType.toUpperCase()) {
1249112492
case GeometryType.POINT:
1249212493
return me.toGeoPoint();
1249312494
case GeometryType.LINE:
@@ -13233,11 +13234,11 @@ class GeoJSON_GeoJSON extends JSON_JSONFormat {
1323313234
if (geometry == null) {
1323413235
return null;
1323513236
}
13236-
var geo = new ServerGeometry_ServerGeometry(geometry).toGeometry();
13237-
if (!geo) {
13238-
return null;
13237+
if (!geometry.parts && geometry.points) {
13238+
geometry.parts = [geometry.points.length];
1323913239
}
13240-
var geometryType = geo.type;
13240+
var geo = new ServerGeometry_ServerGeometry(geometry).toGeometry()||geometry;
13241+
var geometryType = geo.geometryType||geo.type;
1324113242
var data;
1324213243
if (geometryType === "LinearRing") {
1324313244
geometryType = "LineString";
@@ -13272,7 +13273,7 @@ class GeoJSON_GeoJSON extends JSON_JSONFormat {
1327213273
'point': function (point) {
1327313274
var p = [point.x, point.y];
1327413275
for (var name in point) {
13275-
if (name !== "x" && name !== "y" && point[name] && !isNaN(point[name])) {
13276+
if (name !== "x" && name !== "y" && point[name] !== null && !isNaN(point[name])) {
1327613277
p.push(point[name]);
1327713278
}
1327813279
}

dist/leaflet/iclient9-leaflet-es6.min.js

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/leaflet/iclient9-leaflet.js

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3640,7 +3640,7 @@ var ServerGeometry = exports.ServerGeometry = function () {
36403640
value: function toGeometry() {
36413641
var me = this,
36423642
geoType = me.type;
3643-
switch (geoType) {
3643+
switch (geoType.toUpperCase()) {
36443644
case _REST.GeometryType.POINT:
36453645
return me.toGeoPoint();
36463646
case _REST.GeometryType.LINE:
@@ -6352,11 +6352,11 @@ var GeoJSON = exports.GeoJSON = function (_JSONFormat) {
63526352
if (_geometry == null) {
63536353
return null;
63546354
}
6355-
var geo = new _ServerGeometry.ServerGeometry(_geometry).toGeometry();
6356-
if (!geo) {
6357-
return null;
6355+
if (!_geometry.parts && _geometry.points) {
6356+
_geometry.parts = [_geometry.points.length];
63586357
}
6359-
var geometryType = geo.type;
6358+
var geo = new _ServerGeometry.ServerGeometry(_geometry).toGeometry() || _geometry;
6359+
var geometryType = geo.geometryType || geo.type;
63606360
var data;
63616361
if (geometryType === "LinearRing") {
63626362
geometryType = "LineString";
@@ -6390,7 +6390,7 @@ var GeoJSON = exports.GeoJSON = function (_JSONFormat) {
63906390
'point': function point(_point) {
63916391
var p = [_point.x, _point.y];
63926392
for (var name in _point) {
6393-
if (name !== "x" && name !== "y" && _point[name] && !isNaN(_point[name])) {
6393+
if (name !== "x" && name !== "y" && _point[name] !== null && !isNaN(_point[name])) {
63946394
p.push(_point[name]);
63956395
}
63966396
}
@@ -7838,7 +7838,7 @@ var LineString = exports.LineString = function (_Curve) {
78387838
var _this = _possibleConstructorReturn(this, (LineString.__proto__ || Object.getPrototypeOf(LineString)).call(this, points));
78397839

78407840
_this.CLASS_NAME = "SuperMap.Geometry.LineString";
7841-
_this.type = "LineString";
7841+
_this.geometryType = "LineString";
78427842
return _this;
78437843
}
78447844

@@ -8232,7 +8232,7 @@ var Point = exports.Point = function (_Geometry) {
82328232
*/
82338233
_this.type = type || "Point";
82348234
_this.CLASS_NAME = "SuperMap.Geometry.Point";
8235-
_this.type = "Point";
8235+
_this.geometryType = "Point";
82368236
return _this;
82378237
}
82388238

@@ -11695,7 +11695,7 @@ var Collection = exports.Collection = function (_Geometry) {
1169511695
_this.addComponents(components);
1169611696
}
1169711697
_this.CLASS_NAME = "SuperMap.Geometry.Collection";
11698-
_this.type = "Collection";
11698+
_this.geometryType = "Collection";
1169911699
return _this;
1170011700
}
1170111701

@@ -13212,7 +13212,7 @@ var LinearRing = exports.LinearRing = function (_LineString) {
1321213212

1321313213
_this.componentTypes = ["SuperMap.Geometry.Point"];
1321413214
_this.CLASS_NAME = "SuperMap.Geometry.LinearRing";
13215-
_this.type = "LinearRing";
13215+
_this.geometryType = "LinearRing";
1321613216
return _this;
1321713217
}
1321813218

@@ -13939,7 +13939,7 @@ var MultiPoint = exports.MultiPoint = function (_Collection) {
1393913939

1394013940
_this.componentTypes = ["SuperMap.Geometry.Point"];
1394113941
_this.CLASS_NAME = "SuperMap.Geometry.MultiPoint";
13942-
_this.type = "MultiPoint";
13942+
_this.geometryType = "MultiPoint";
1394313943
return _this;
1394413944
}
1394513945

@@ -15223,7 +15223,7 @@ var Polygon = exports.Polygon = function (_Collection) {
1522315223

1522415224
_this.componentTypes = ["SuperMap.Geometry.LinearRing"];
1522515225
_this.CLASS_NAME = "SuperMap.Geometry.Polygon";
15226-
_this.type = "Polygon";
15226+
_this.geometryType = "Polygon";
1522715227
return _this;
1522815228
}
1522915229

@@ -15311,7 +15311,7 @@ var MultiPolygon = exports.MultiPolygon = function (_Collection) {
1531115311

1531215312
_this.componentTypes = ["SuperMap.Geometry.Polygon"];
1531315313
_this.CLASS_NAME = "SuperMap.Geometry.MultiPolygon";
15314-
_this.type = "MultiPolygon";
15314+
_this.geometryType = "MultiPolygon";
1531515315
return _this;
1531615316
}
1531715317

@@ -15376,7 +15376,7 @@ var MultiLineString = exports.MultiLineString = function (_Collection) {
1537615376

1537715377
_this.componentTypes = ["SuperMap.Geometry.LineString"];
1537815378
_this.CLASS_NAME = "SuperMap.Geometry.MultiLineString";
15379-
_this.type = "MultiLineString";
15379+
_this.geometryType = "MultiLineString";
1538015380
return _this;
1538115381
}
1538215382

@@ -19992,6 +19992,7 @@ var Route = exports.Route = function (_Collection) {
1999219992
}
1999319993

1999419994
_this.CLASS_NAME = "SuperMap.Route";
19995+
_this.geometryType = "LINEM";
1999519996
return _this;
1999619997
}
1999719998

@@ -29617,7 +29618,7 @@ var GeoText = exports.GeoText = function (_Geometry) {
2961729618
};
2961829619
_this.element = document.createElement('span');
2961929620
_this.CLASS_NAME = "SuperMap.Geometry.GeoText";
29620-
_this.type = "GeoText";
29621+
_this.geometryType = "GeoText";
2962129622
return _this;
2962229623
}
2962329624

@@ -29968,7 +29969,7 @@ var Curve = exports.Curve = function (_MultiPoint) {
2996829969

2996929970
_this.componentTypes = ["SuperMap.Geometry.Point", "SuperMap.PointWithMeasure"];
2997029971
_this.CLASS_NAME = "SuperMap.Geometry.Curve";
29971-
_this.type = "Curve";
29972+
_this.geometryType = "Curve";
2997229973

2997329974
return _this;
2997429975
}
@@ -64240,7 +64241,7 @@ var Rectangle = exports.Rectangle = function (_Geometry) {
6424064241
_this.height = height;
6424164242

6424264243
_this.CLASS_NAME = "SuperMap.Geometry.Rectangle";
64243-
_this.type = "Rectangle";
64244+
_this.geometryType = "Rectangle";
6424464245
return _this;
6424564246
}
6424664247

dist/leaflet/iclient9-leaflet.min.js

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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