| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ccd8fe0 commit 5769c82
26 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -42383,7 +42383,13 @@ var GEOMETRY_TYPE_MAP = { | |||
| 42383 | 42383 | 3: 'fill', | |
| 42384 | 42384 | 5: 'line', | |
| 42385 | 42385 | 4: 'circle', | |
| 42386 | - 6: 'fill' | ||
| 42386 | + 6: 'fill', | ||
| 42387 | + 'MultiPolygon': 'fill', | ||
| 42388 | + 'Point': 'circle', | ||
| 42389 | + 'MultiLineString': 'line', | ||
| 42390 | + 'MultiPoint': 'circle', | ||
| 42391 | + 'LineString': 'line', | ||
| 42392 | + 'Polygon': 'fill' | ||
| 42387 | 42393 | }; | |
| 42388 | 42394 | var PAINT_MAP = { | |
| 42389 | 42395 | circle: { | |
@@ -42584,53 +42590,56 @@ var FGBLayer = /*#__PURE__*/function () { | |||
| 42584 | 42590 | return _iterator.next(); | |
| 42585 | 42591 | case 7: | |
| 42586 | 42592 | if (!(_iteratorAbruptCompletion = !(_step = _context3.sent).done)) { | |
| 42587 | - _context3.next = 14; | ||
| 42593 | + _context3.next = 15; | ||
| 42588 | 42594 | break; | |
| 42589 | 42595 | } | |
| 42590 | 42596 | feature = _step.value; | |
| 42591 | 42597 | if (this.options.featureLoader && typeof this.options.featureLoader === 'function') { | |
| 42592 | 42598 | feature = this.options.featureLoader(feature); | |
| 42593 | 42599 | } | |
| 42600 | + if (!this.layerType) { | ||
| 42601 | + this.layerType = GEOMETRY_TYPE_MAP[feature.geometry.type]; | ||
| 42602 | + } | ||
| 42594 | 42603 | features.features.push(feature); | |
| 42595 | - case 11: | ||
| 42604 | + case 12: | ||
| 42596 | 42605 | _iteratorAbruptCompletion = false; | |
| 42597 | 42606 | _context3.next = 5; | |
| 42598 | 42607 | break; | |
| 42599 | - case 14: | ||
| 42600 | - _context3.next = 20; | ||
| 42608 | + case 15: | ||
| 42609 | + _context3.next = 21; | ||
| 42601 | 42610 | break; | |
| 42602 | - case 16: | ||
| 42603 | - _context3.prev = 16; | ||
| 42611 | + case 17: | ||
| 42612 | + _context3.prev = 17; | ||
| 42604 | 42613 | _context3.t0 = _context3["catch"](3); | |
| 42605 | 42614 | _didIteratorError = true; | |
| 42606 | 42615 | _iteratorError = _context3.t0; | |
| 42607 | - case 20: | ||
| 42608 | - _context3.prev = 20; | ||
| 42616 | + case 21: | ||
| 42609 | 42617 | _context3.prev = 21; | |
| 42618 | + _context3.prev = 22; | ||
| 42610 | 42619 | if (!(_iteratorAbruptCompletion && _iterator["return"] != null)) { | |
| 42611 | - _context3.next = 25; | ||
| 42620 | + _context3.next = 26; | ||
| 42612 | 42621 | break; | |
| 42613 | 42622 | } | |
| 42614 | - _context3.next = 25; | ||
| 42623 | + _context3.next = 26; | ||
| 42615 | 42624 | return _iterator["return"](); | |
| 42616 | - case 25: | ||
| 42617 | - _context3.prev = 25; | ||
| 42625 | + case 26: | ||
| 42626 | + _context3.prev = 26; | ||
| 42618 | 42627 | if (!_didIteratorError) { | |
| 42619 | - _context3.next = 28; | ||
| 42628 | + _context3.next = 29; | ||
| 42620 | 42629 | break; | |
| 42621 | 42630 | } | |
| 42622 | 42631 | throw _iteratorError; | |
| 42623 | - case 28: | ||
| 42624 | - return _context3.finish(25); | ||
| 42625 | 42632 | case 29: | |
| 42626 | - return _context3.finish(20); | ||
| 42633 | + return _context3.finish(26); | ||
| 42627 | 42634 | case 30: | |
| 42628 | - return _context3.abrupt("return", features); | ||
| 42635 | + return _context3.finish(21); | ||
| 42629 | 42636 | case 31: | |
| 42637 | + return _context3.abrupt("return", features); | ||
| 42638 | + case 32: | ||
| 42630 | 42639 | case "end": | |
| 42631 | 42640 | return _context3.stop(); | |
| 42632 | 42641 | } | |
| 42633 | - }, _callee3, this, [[3, 16, 20, 30], [21,, 25, 29]]); | ||
| 42642 | + }, _callee3, this, [[3, 17, 21, 31], [22,, 26, 30]]); | ||
| 42634 | 42643 | })); | |
| 42635 | 42644 | function iterateFeatures(_x2) { | |
| 42636 | 42645 | return _iterateFeatures.apply(this, arguments); | |
@@ -42652,11 +42661,7 @@ var FGBLayer = /*#__PURE__*/function () { | |||
| 42652 | 42661 | break; | |
| 42653 | 42662 | } | |
| 42654 | 42663 | _context4.next = 4; | |
| 42655 | - return FetchRequest.get(this.url, {}, { | ||
| 42656 | - withoutFormatSuffix: true | ||
| 42657 | - }).then(function (response) { | ||
| 42658 | - return response; | ||
| 42659 | - }); | ||
| 42664 | + return this._getStream(this.url); | ||
| 42660 | 42665 | case 4: | |
| 42661 | 42666 | fgbStream = _context4.sent; | |
| 42662 | 42667 | case 5: | |
@@ -42677,6 +42682,32 @@ var FGBLayer = /*#__PURE__*/function () { | |||
| 42677 | 42682 | } | |
| 42678 | 42683 | return _loadData; | |
| 42679 | 42684 | }() | |
| 42685 | + }, { | ||
| 42686 | + key: "_getStream", | ||
| 42687 | + value: function () { | ||
| 42688 | + var _getStream2 = FGBLayer_asyncToGenerator( /*#__PURE__*/FGBLayer_regeneratorRuntime().mark(function _callee5(url) { | ||
| 42689 | + return FGBLayer_regeneratorRuntime().wrap(function _callee5$(_context5) { | ||
| 42690 | + while (1) switch (_context5.prev = _context5.next) { | ||
| 42691 | + case 0: | ||
| 42692 | + _context5.next = 2; | ||
| 42693 | + return FetchRequest.get(url, {}, { | ||
| 42694 | + withoutFormatSuffix: true | ||
| 42695 | + }).then(function (response) { | ||
| 42696 | + return response; | ||
| 42697 | + }); | ||
| 42698 | + case 2: | ||
| 42699 | + return _context5.abrupt("return", _context5.sent); | ||
| 42700 | + case 3: | ||
| 42701 | + case "end": | ||
| 42702 | + return _context5.stop(); | ||
| 42703 | + } | ||
| 42704 | + }, _callee5); | ||
| 42705 | + })); | ||
| 42706 | + function _getStream(_x4) { | ||
| 42707 | + return _getStream2.apply(this, arguments); | ||
| 42708 | + } | ||
| 42709 | + return _getStream; | ||
| 42710 | + }() | ||
| 42680 | 42711 | }, { | |
| 42681 | 42712 | key: "_containsExtent", | |
| 42682 | 42713 | value: function _containsExtent(extent1, extent2) { | |
@@ -46148,6 +46179,9 @@ class GetFeaturesServiceBase extends CommonServiceBase { | |||
| 46148 | 46179 | me.toIndex = params.toIndex; | |
| 46149 | 46180 | me.maxFeatures = params.maxFeatures; | |
| 46150 | 46181 | me.hasGeometry = params.hasGeometry; | |
| 46182 | + if (me.returnContent) { | ||
| 46183 | + firstPara = false; | ||
| 46184 | + } | ||
| 46151 | 46185 | var isValidNumber = me.fromIndex != null && me.toIndex != null && !isNaN(me.fromIndex) && !isNaN(me.toIndex); | |
| 46152 | 46186 | if (isValidNumber && me.fromIndex >= 0 && me.toIndex >= 0 && !firstPara) { | |
| 46153 | 46187 | me.url = Util.urlAppend(me.url, `fromIndex=${me.fromIndex}&toIndex=${me.toIndex}`); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments