Skip to content

Commit 9c99604

Browse files
author
caoxinke@supermap.com
committed
fix 部分代码逻辑错误以及不合适的命名。
1 parent c9505c7 commit 9c99604

File tree

12 files changed

+56
-202
lines changed

12 files changed

+56
-202
lines changed

dist/iclient9-mapboxgl.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19609,7 +19609,7 @@ var GeoFeature = function (_Theme) {
1960919609
_this.cache = opt_options.cache || {};
1961019610
_this.cacheFields = opt_options.cacheFields || [];
1961119611
_this.maxCacheCount = opt_options.maxCacheCount || 0;
19612-
_this.isCustomSetMaxCacheCount = opt_options.isCustomSetMaxCacheCount || false;
19612+
_this.isCustomSetMaxCacheCount = opt_options.isCustomSetMaxCacheCount === undefined ? false : opt_options.isCustomSetMaxCacheCount;
1961319613

1961419614
return _this;
1961519615
}
@@ -19970,7 +19970,7 @@ var Graph = function (_Theme) {
1997019970
_this.chartsSetting = opt_options.chartsSetting || {};
1997119971
_this.themeFields = opt_options.themeFields || null;
1997219972
_this.overlayWeightField = opt_options.overlayWeightField || null;
19973-
_this.isOverLay = opt_options.isOverLay || true;
19973+
_this.isOverLay = opt_options.isOverLay === undefined ? true : opt_options.isOverLay;
1997419974
_this.charts = opt_options.charts || [];
1997519975
_this.cache = opt_options.cache || {};
1997619976
_this.chartsType = chartsType;

dist/iclient9-mapboxgl.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: 25 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -19382,13 +19382,13 @@ var GeoFeature = function (_Theme) {
1938219382
_this.cacheFields = opt_options.cacheFields || [];
1938319383
_this.style = opt_options.style || {};
1938419384
_this.maxCacheCount = opt_options.maxCacheCount || 0;
19385-
_this.isCustomSetMaxCacheCount = opt_options.isCustomSetMaxCacheCount || false;
19385+
_this.isCustomSetMaxCacheCount = opt_options.isCustomSetMaxCacheCount === undefined ? false : opt_options.isCustomSetMaxCacheCount;
1938619386
_this.nodesClipPixel = opt_options.nodesClipPixel || 2;
19387-
_this.isHoverAble = opt_options.isHoverAble || false;
19388-
_this.isMultiHover = opt_options.isMultiHover || false;
19389-
_this.isClickAble = opt_options.isClickAble || true;
19387+
_this.isHoverAble = opt_options.isHoverAble === undefined ? false : opt_options.isHoverAble;
19388+
_this.isMultiHover = opt_options.isMultiHover === undefined ? false : opt_options.isMultiHover;
19389+
_this.isClickAble = opt_options.isClickAble === undefined ? true : opt_options.isClickAble;
1939019390
_this.highlightStyle = opt_options.highlightStyle || null;
19391-
_this.isAllowFeatureStyle = opt_options.isAllowFeatureStyle || false;
19391+
_this.isAllowFeatureStyle = opt_options.isAllowFeatureStyle === undefined ? false : opt_options.isAllowFeatureStyle;
1939219392
return _this;
1939319393
}
1939419394

@@ -19976,7 +19976,7 @@ var Tianditu = function (_ol$source$WMTS) {
1997619976
attributions: attributions,
1997719977
cacheSize: options.cacheSize,
1997819978
crossOrigin: options.crossOrigin,
19979-
opaque: options.opaque || true,
19979+
opaque: options.opaque === undefined ? true : options.opaque,
1998019980
maxZoom: _olDebug2.default.source.Tianditu.layerZoomMap[options.layerType],
1998119981
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
1998219982
tileLoadFunction: options.tileLoadFunction,
@@ -20160,7 +20160,7 @@ var Graph = function (_Theme) {
2016020160
_this.chartsSetting = opt_options.chartsSetting || {};
2016120161
_this.themeFields = opt_options.themeFields || null;
2016220162
_this.overlayWeightField = opt_options.overlayWeightField || null;
20163-
_this.isOverLay = opt_options.isOverLay || true;
20163+
_this.isOverLay = opt_options.isOverLay === undefined ? true : opt_options.isOverLay;
2016420164
_this.charts = opt_options.charts || [];
2016520165
_this.cache = opt_options.cache || {};
2016620166
_this.chartsType = chartsType;
@@ -21595,29 +21595,6 @@ var Range = function (_GeoFeature) {
2159521595
_this.highlightStyle = opt_options.highlightStyle;
2159621596
_this.themeField = opt_options.themeField;
2159721597
_this.styleGroups = opt_options.styleGroups;
21598-
21599-
// //添加features
21600-
// var features = this.features;
21601-
// if (!(SuperMap.Util.isArray(features))) {
21602-
// features = [features];
21603-
// }
21604-
// var event = {features: features};
21605-
// var ret = this.dispatchEvent({type: 'beforefeaturesadded', value: event});
21606-
// if (ret === false) {
21607-
// return;
21608-
// }
21609-
// features = event.features;
21610-
// var featuresFailAdded = [];
21611-
// var toFeatures = [];
21612-
// for (var i = 0, len = features.length; i < len; i++) {
21613-
// toFeatures.push(new ServerFeature.fromJson(features[i]).toFeature());
21614-
// }
21615-
// this.features = toFeatures;
21616-
// var succeed = featuresFailAdded.length == 0 ? true : false;
21617-
// this.dispatchEvent({type: 'featuresadded', value: {features: featuresFailAdded, succeed: succeed}});
21618-
// if (!this.isCustomSetMaxCacheCount) {
21619-
// this.maxCacheCount = this.features.length * 5;
21620-
// }
2162121598
return _this;
2162221599
}
2162321600

@@ -32216,7 +32193,7 @@ var SuperMapCloud = function (_ol$source$XYZ) {
3221632193
attributions: attributions,
3221732194
cacheSize: options.cacheSize,
3221832195
crossOrigin: options.crossOrigin,
32219-
opaque: options.opaque || true,
32196+
opaque: options.opaque === undefined ? true : options.opaque,
3222032197
maxZoom: options.maxZoom || 18,
3222132198
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
3222232199
tileLoadFunction: options.tileLoadFunction,
@@ -85891,26 +85868,26 @@ var VectorTileStyles = function (_ol$Observable) {
8589185868
if (options.cartoCss) {
8589285869
_olDebug2.default.supermap.VectorTileStyles.setCartoCss(options.cartoCss);
8589385870
}
85894-
var selectdPointStyle = getDefaultSelectedPointStyle();
85895-
if (options.selectdPointStyle) {
85896-
selectdPointStyle = options.selectdPointStyle;
85871+
var selectedPointStyle = getDefaultSelectedPointStyle();
85872+
if (options.selectedPointStyle) {
85873+
selectedPointStyle = options.selectedPointStyle;
8589785874
}
85898-
_olDebug2.default.supermap.VectorTileStyles.setSelectedPointStyle(selectdPointStyle);
85899-
var selectdLineStyle = getDefaultSelectedLineStyle();
85900-
if (options.selectdLineStyle) {
85901-
selectdLineStyle = options.selectdLineStyle;
85875+
_olDebug2.default.supermap.VectorTileStyles.setSelectedPointStyle(selectedPointStyle);
85876+
var selectedLineStyle = getDefaultSelectedLineStyle();
85877+
if (options.selectedLineStyle) {
85878+
selectedLineStyle = options.selectedLineStyle;
8590285879
}
85903-
_olDebug2.default.supermap.VectorTileStyles.setSelectedLineStyle(selectdLineStyle);
85904-
var selectdRegionStyle = getDefaultSelectedRegionStyle();
85905-
if (options.selectdRegionStyle) {
85906-
selectdRegionStyle = options.selectdRegionStyle;
85880+
_olDebug2.default.supermap.VectorTileStyles.setSelectedLineStyle(selectedLineStyle);
85881+
var selectedRegionStyle = getDefaultSelectedRegionStyle();
85882+
if (options.selectedRegionStyle) {
85883+
selectedRegionStyle = options.selectedRegionStyle;
8590785884
}
85908-
_olDebug2.default.supermap.VectorTileStyles.setSelectedRegionStyle(selectdRegionStyle);
85909-
var selectdTextStyle = getDefaultSelectedTextStyle();
85910-
if (options.selectdTextStyle) {
85911-
selectdTextStyle = options.selectdTextStyle;
85885+
_olDebug2.default.supermap.VectorTileStyles.setSelectedRegionStyle(selectedRegionStyle);
85886+
var selectedTextStyle = getDefaultSelectedTextStyle();
85887+
if (options.selectedTextStyle) {
85888+
selectedTextStyle = options.selectedTextStyle;
8591285889
}
85913-
_olDebug2.default.supermap.VectorTileStyles.setSelectedTextStyle(selectdTextStyle);
85890+
_olDebug2.default.supermap.VectorTileStyles.setSelectedTextStyle(selectedTextStyle);
8591485891
var layersXHR = new XMLHttpRequest();
8591585892
layersXHR.onreadystatechange = function () {
8591685893
if (layersXHR.readyState == 4) {
@@ -92054,108 +92031,7 @@ module.exports = whatwgFetch;
9205492031
/* 438 */
9205592032
/***/ (function(module, exports) {
9205692033

92057-
module.exports = {
92058-
"_from": "proj4@2.3.15",
92059-
"_id": "proj4@2.3.15",
92060-
"_inBundle": false,
92061-
"_integrity": "sha1-WtBui8owvg/6OJpJ5FZfUfBtCJ4=",
92062-
"_location": "/proj4",
92063-
"_phantomChildren": {},
92064-
"_requested": {
92065-
"type": "version",
92066-
"registry": true,
92067-
"raw": "proj4@2.3.15",
92068-
"name": "proj4",
92069-
"escapedName": "proj4",
92070-
"rawSpec": "2.3.15",
92071-
"saveSpec": null,
92072-
"fetchSpec": "2.3.15"
92073-
},
92074-
"_requiredBy": [
92075-
"/"
92076-
],
92077-
"_resolved": "http://registry.npm.taobao.org/proj4/download/proj4-2.3.15.tgz",
92078-
"_shasum": "5ad06e8bca30be0ffa389a49e4565f51f06d089e",
92079-
"_spec": "proj4@2.3.15",
92080-
"_where": "F:\\dev\\iClient",
92081-
"author": "",
92082-
"bugs": {
92083-
"url": "https://github.com/proj4js/proj4js/issues"
92084-
},
92085-
"bundleDependencies": false,
92086-
"contributors": [
92087-
{
92088-
"name": "Mike Adair",
92089-
"email": "madair@dmsolutions.ca"
92090-
},
92091-
{
92092-
"name": "Richard Greenwood",
92093-
"email": "rich@greenwoodmap.com"
92094-
},
92095-
{
92096-
"name": "Calvin Metcalf",
92097-
"email": "calvin.metcalf@gmail.com"
92098-
},
92099-
{
92100-
"name": "Richard Marsden",
92101-
"url": "http://www.winwaed.com"
92102-
},
92103-
{
92104-
"name": "T. Mittan"
92105-
},
92106-
{
92107-
"name": "D. Steinwand"
92108-
},
92109-
{
92110-
"name": "S. Nelson"
92111-
}
92112-
],
92113-
"dependencies": {
92114-
"mgrs": "~0.0.2"
92115-
},
92116-
"deprecated": false,
92117-
"description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",
92118-
"devDependencies": {
92119-
"browserify": "~12.0.1",
92120-
"chai": "~1.8.1",
92121-
"curl": "git://github.com/cujojs/curl.git",
92122-
"grunt": "~0.4.2",
92123-
"grunt-browserify": "~4.0.1",
92124-
"grunt-cli": "~0.1.13",
92125-
"grunt-contrib-connect": "~0.6.0",
92126-
"grunt-contrib-jshint": "~0.8.0",
92127-
"grunt-contrib-uglify": "~0.11.1",
92128-
"grunt-mocha-phantomjs": "~0.4.0",
92129-
"istanbul": "~0.2.4",
92130-
"mocha": "~1.17.1",
92131-
"tin": "~0.4.0"
92132-
},
92133-
"directories": {
92134-
"test": "test",
92135-
"doc": "docs"
92136-
},
92137-
"homepage": "https://github.com/proj4js/proj4js#readme",
92138-
"jam": {
92139-
"main": "dist/proj4.js",
92140-
"include": [
92141-
"dist/proj4.js",
92142-
"README.md",
92143-
"AUTHORS",
92144-
"LICENSE.md"
92145-
]
92146-
},
92147-
"license": "MIT",
92148-
"main": "lib/index.js",
92149-
"name": "proj4",
92150-
"repository": {
92151-
"type": "git",
92152-
"url": "git://github.com/proj4js/proj4js.git"
92153-
},
92154-
"scripts": {
92155-
"test": "./node_modules/istanbul/lib/cli.js test ./node_modules/mocha/bin/_mocha test/test.js"
92156-
},
92157-
"version": "2.3.15"
92158-
};
92034+
module.exports = {"_from":"proj4@2.3.15","_id":"proj4@2.3.15","_inBundle":false,"_integrity":"sha1-WtBui8owvg/6OJpJ5FZfUfBtCJ4=","_location":"/proj4","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"proj4@2.3.15","name":"proj4","escapedName":"proj4","rawSpec":"2.3.15","saveSpec":null,"fetchSpec":"2.3.15"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/proj4/-/proj4-2.3.15.tgz","_shasum":"5ad06e8bca30be0ffa389a49e4565f51f06d089e","_spec":"proj4@2.3.15","_where":"F:\\codes\\iClient9Copy\\iClient9","author":"","bugs":{"url":"https://github.com/proj4js/proj4js/issues"},"bundleDependencies":false,"contributors":[{"name":"Mike Adair","email":"madair@dmsolutions.ca"},{"name":"Richard Greenwood","email":"rich@greenwoodmap.com"},{"name":"Calvin Metcalf","email":"calvin.metcalf@gmail.com"},{"name":"Richard Marsden","url":"http://www.winwaed.com"},{"name":"T. Mittan"},{"name":"D. Steinwand"},{"name":"S. Nelson"}],"dependencies":{"mgrs":"~0.0.2"},"deprecated":false,"description":"Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.","devDependencies":{"browserify":"~12.0.1","chai":"~1.8.1","curl":"git://github.com/cujojs/curl.git","grunt":"~0.4.2","grunt-browserify":"~4.0.1","grunt-cli":"~0.1.13","grunt-contrib-connect":"~0.6.0","grunt-contrib-jshint":"~0.8.0","grunt-contrib-uglify":"~0.11.1","grunt-mocha-phantomjs":"~0.4.0","istanbul":"~0.2.4","mocha":"~1.17.1","tin":"~0.4.0"},"directories":{"test":"test","doc":"docs"},"homepage":"https://github.com/proj4js/proj4js#readme","jam":{"main":"dist/proj4.js","include":["dist/proj4.js","README.md","AUTHORS","LICENSE.md"]},"license":"MIT","main":"lib/index.js","name":"proj4","repository":{"type":"git","url":"git://github.com/proj4js/proj4js.git"},"scripts":{"test":"./node_modules/istanbul/lib/cli.js test ./node_modules/mocha/bin/_mocha test/test.js"},"version":"2.3.15"}
9215992035

9216092036
/***/ }),
9216192037
/* 439 */

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/mapboxgl/overlay/GraphThemeLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default class Graph extends Theme {
2727
this.chartsSetting = opt_options.chartsSetting || {};
2828
this.themeFields = opt_options.themeFields || null;
2929
this.overlayWeightField = opt_options.overlayWeightField || null;
30-
this.isOverLay = opt_options.isOverLay || true;
30+
this.isOverLay = opt_options.isOverLay === undefined ? true : opt_options.isOverLay;
3131
this.charts = opt_options.charts || [];
3232
this.cache = opt_options.cache || {};
3333
this.chartsType = chartsType;

src/mapboxgl/overlay/theme/GeoFeatureThemeLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default class GeoFeature extends Theme {
6868
this.cache = opt_options.cache || {};
6969
this.cacheFields = opt_options.cacheFields || [];
7070
this.maxCacheCount = opt_options.maxCacheCount || 0;
71-
this.isCustomSetMaxCacheCount = opt_options.isCustomSetMaxCacheCount || false;
71+
this.isCustomSetMaxCacheCount = opt_options.isCustomSetMaxCacheCount === undefined ? false : opt_options.isCustomSetMaxCacheCount;
7272

7373
}
7474

src/openlayers/mapping/SuperMapCloud.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import ol from 'openlayers/dist/ol-debug';
2+
23
/**
34
* @class ol.source.SuperMapCloud
45
* @classdesc 超图云地图图层源。
@@ -27,7 +28,7 @@ export default class SuperMapCloud extends ol.source.XYZ {
2728
attributions: attributions,
2829
cacheSize: options.cacheSize,
2930
crossOrigin: options.crossOrigin,
30-
opaque: options.opaque || true,
31+
opaque: options.opaque === undefined ? true : options.opaque,
3132
maxZoom: options.maxZoom || 18,
3233
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
3334
tileLoadFunction: options.tileLoadFunction,

src/openlayers/mapping/Tianditu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default class Tianditu extends ol.source.WMTS {
4242
attributions: attributions,
4343
cacheSize: options.cacheSize,
4444
crossOrigin: options.crossOrigin,
45-
opaque: options.opaque || true,
45+
opaque: options.opaque === undefined ? true : options.opaque,
4646
maxZoom: ol.source.Tianditu.layerZoomMap[options.layerType],
4747
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
4848
tileLoadFunction: options.tileLoadFunction,

src/openlayers/overlay/Graph.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default class Graph extends Theme {
2727
this.chartsSetting = opt_options.chartsSetting || {};
2828
this.themeFields = opt_options.themeFields || null;
2929
this.overlayWeightField = opt_options.overlayWeightField || null;
30-
this.isOverLay = opt_options.isOverLay || true;
30+
this.isOverLay = opt_options.isOverLay === undefined ? true : opt_options.isOverLay;
3131
this.charts = opt_options.charts || [];
3232
this.cache = opt_options.cache || {};
3333
this.chartsType = chartsType;

src/openlayers/overlay/Range.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,6 @@ export default class Range extends GeoFeature {
1919
this.highlightStyle = opt_options.highlightStyle;
2020
this.themeField = opt_options.themeField;
2121
this.styleGroups = opt_options.styleGroups;
22-
23-
// //添加features
24-
// var features = this.features;
25-
// if (!(SuperMap.Util.isArray(features))) {
26-
// features = [features];
27-
// }
28-
// var event = {features: features};
29-
// var ret = this.dispatchEvent({type: 'beforefeaturesadded', value: event});
30-
// if (ret === false) {
31-
// return;
32-
// }
33-
// features = event.features;
34-
// var featuresFailAdded = [];
35-
// var toFeatures = [];
36-
// for (var i = 0, len = features.length; i < len; i++) {
37-
// toFeatures.push(new ServerFeature.fromJson(features[i]).toFeature());
38-
// }
39-
// this.features = toFeatures;
40-
// var succeed = featuresFailAdded.length == 0 ? true : false;
41-
// this.dispatchEvent({type: 'featuresadded', value: {features: featuresFailAdded, succeed: succeed}});
42-
// if (!this.isCustomSetMaxCacheCount) {
43-
// this.maxCacheCount = this.features.length * 5;
44-
// }
4522
}
4623

4724
/**

0 commit comments

Comments
 (0)