Skip to content

Commit 240ce1f

Browse files
committed
fix 矢量瓦片点要素的symbolMarker风格丢失问题
1 parent bca4577 commit 240ce1f

File tree

6 files changed

+125
-7
lines changed

6 files changed

+125
-7
lines changed

dist/iclient9-leaflet.js

Lines changed: 105 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18737,7 +18737,12 @@ var TileVectorLayer = exports.TileVectorLayer = _VectorGrid.VectorGrid.extend({
1873718737

1873818738
//处理标签图层
1873918739
if (layerStyleInfo.textField) {
18740-
feature.properties.textField = layerStyleInfo.textField;
18740+
var textField = layerStyleInfo.textField;
18741+
if (textField && textField.indexOf('.')) {
18742+
var arr = textField.split('.');
18743+
textField = arr && arr.length > 0 && arr[arr.length - 1];
18744+
}
18745+
feature.properties.textField = textField;
1874118746
}
1874218747

1874318748
me.vectorTileLayerStyles = me.vectorTileLayerStyles || {};
@@ -64577,7 +64582,105 @@ var names = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"];
6457764582
/* 397 */
6457864583
/***/ (function(module, exports) {
6457964584

64580-
module.exports = {"_args":[[{"raw":"proj4@2.4.3","scope":null,"escapedName":"proj4","name":"proj4","rawSpec":"2.4.3","spec":"2.4.3","type":"version"},"E:\\git\\iClient9"]],"_from":"proj4@2.4.3","_id":"proj4@2.4.3","_inCache":true,"_location":"/proj4","_nodeVersion":"6.9.2","_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/proj4-2.4.3.tgz_1488570790416_0.3068596587982029"},"_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"_npmVersion":"4.0.5","_phantomChildren":{},"_requested":{"raw":"proj4@2.4.3","scope":null,"escapedName":"proj4","name":"proj4","rawSpec":"2.4.3","spec":"2.4.3","type":"version"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/proj4/-/proj4-2.4.3.tgz","_shasum":"f3bb7e631bffc047c36a1a3cc14533a03bbe9969","_shrinkwrap":null,"_spec":"proj4@2.4.3","_where":"E:\\git\\iClient9","author":"","bugs":{"url":"https://github.com/proj4js/proj4js/issues"},"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":"1.0.0","wkt-parser":"^1.1.3"},"description":"Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.","devDependencies":{"chai":"~1.8.1","curl":"git://github.com/cujojs/curl.git","grunt":"~0.4.2","grunt-cli":"~0.1.13","grunt-contrib-connect":"~0.6.0","grunt-contrib-jshint":"~1.1.0","grunt-contrib-uglify":"~0.11.1","grunt-mocha-phantomjs":"~0.4.0","grunt-rollup":"^1.0.1","istanbul":"~0.2.4","mocha":"~1.17.1","rollup":"^0.41.4","rollup-plugin-json":"^2.0.1","rollup-plugin-node-resolve":"^2.0.0","tin":"~0.4.0"},"directories":{"test":"test","doc":"docs"},"dist":{"shasum":"f3bb7e631bffc047c36a1a3cc14533a03bbe9969","tarball":"https://registry.npmjs.org/proj4/-/proj4-2.4.3.tgz"},"gitHead":"e975a5462ad7abb23e33ea75281eb749e77e1510","homepage":"https://github.com/proj4js/proj4js#readme","license":"MIT","main":"dist/proj4-src.js","maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"},{"name":"ahocevar","email":"andreas.hocevar@gmail.com"}],"module":"lib/index.js","name":"proj4","optionalDependencies":{},"readme":"ERROR: No README data found!","repository":{"type":"git","url":"git://github.com/proj4js/proj4js.git"},"scripts":{"build":"grunt","build:tmerc":"grunt build:tmerc","test":"npm run build && istanbul test _mocha test/test.js"},"version":"2.4.3"}
64585+
module.exports = {
64586+
"_from": "proj4@2.4.3",
64587+
"_id": "proj4@2.4.3",
64588+
"_inBundle": false,
64589+
"_integrity": "sha1-87t+Yxv/wEfDaho8wUUzoDu+mWk=",
64590+
"_location": "/proj4",
64591+
"_phantomChildren": {},
64592+
"_requested": {
64593+
"type": "version",
64594+
"registry": true,
64595+
"raw": "proj4@2.4.3",
64596+
"name": "proj4",
64597+
"escapedName": "proj4",
64598+
"rawSpec": "2.4.3",
64599+
"saveSpec": null,
64600+
"fetchSpec": "2.4.3"
64601+
},
64602+
"_requiredBy": [
64603+
"/"
64604+
],
64605+
"_resolved": "http://registry.npm.taobao.org/proj4/download/proj4-2.4.3.tgz",
64606+
"_shasum": "f3bb7e631bffc047c36a1a3cc14533a03bbe9969",
64607+
"_spec": "proj4@2.4.3",
64608+
"_where": "F:\\dev\\iClient9",
64609+
"author": "",
64610+
"bugs": {
64611+
"url": "https://github.com/proj4js/proj4js/issues"
64612+
},
64613+
"bundleDependencies": false,
64614+
"contributors": [
64615+
{
64616+
"name": "Mike Adair",
64617+
"email": "madair@dmsolutions.ca"
64618+
},
64619+
{
64620+
"name": "Richard Greenwood",
64621+
"email": "rich@greenwoodmap.com"
64622+
},
64623+
{
64624+
"name": "Calvin Metcalf",
64625+
"email": "calvin.metcalf@gmail.com"
64626+
},
64627+
{
64628+
"name": "Richard Marsden",
64629+
"url": "http://www.winwaed.com"
64630+
},
64631+
{
64632+
"name": "T. Mittan"
64633+
},
64634+
{
64635+
"name": "D. Steinwand"
64636+
},
64637+
{
64638+
"name": "S. Nelson"
64639+
}
64640+
],
64641+
"dependencies": {
64642+
"mgrs": "1.0.0",
64643+
"wkt-parser": "^1.1.3"
64644+
},
64645+
"deprecated": false,
64646+
"description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",
64647+
"devDependencies": {
64648+
"chai": "~1.8.1",
64649+
"curl": "git://github.com/cujojs/curl.git",
64650+
"grunt": "~0.4.2",
64651+
"grunt-cli": "~0.1.13",
64652+
"grunt-contrib-connect": "~0.6.0",
64653+
"grunt-contrib-jshint": "~1.1.0",
64654+
"grunt-contrib-uglify": "~0.11.1",
64655+
"grunt-mocha-phantomjs": "~0.4.0",
64656+
"grunt-rollup": "^1.0.1",
64657+
"istanbul": "~0.2.4",
64658+
"mocha": "~1.17.1",
64659+
"rollup": "^0.41.4",
64660+
"rollup-plugin-json": "^2.0.1",
64661+
"rollup-plugin-node-resolve": "^2.0.0",
64662+
"tin": "~0.4.0"
64663+
},
64664+
"directories": {
64665+
"test": "test",
64666+
"doc": "docs"
64667+
},
64668+
"homepage": "https://github.com/proj4js/proj4js#readme",
64669+
"license": "MIT",
64670+
"main": "dist/proj4-src.js",
64671+
"module": "lib/index.js",
64672+
"name": "proj4",
64673+
"repository": {
64674+
"type": "git",
64675+
"url": "git://github.com/proj4js/proj4js.git"
64676+
},
64677+
"scripts": {
64678+
"build": "grunt",
64679+
"build:tmerc": "grunt build:tmerc",
64680+
"test": "npm run build && istanbul test _mocha test/test.js"
64681+
},
64682+
"version": "2.4.3"
64683+
};
6458164684

6458264685
/***/ }),
6458364686
/* 398 */

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: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10584,7 +10584,12 @@ var StyleUtils = function () {
1058410584
text = feature.getProperties().texts[0];
1058510585
}
1058610586
if (layerInfo.type === 'LABEL') {
10587-
text = feature.getProperties().attributes ? feature.getProperties().attributes[layerInfo.textField] : feature.getProperties()[layerInfo.textField];
10587+
var textField = layerInfo.textField;
10588+
if (textField && textField.indexOf('.')) {
10589+
var arr = textField.split('.');
10590+
textField = arr && arr.length > 0 && arr[arr.length - 1];
10591+
}
10592+
text = feature.getProperties().attributes ? feature.getProperties().attributes[textField] : feature.getProperties()[textField];
1058810593
}
1058910594
if (feature.getProperties().TEXT_FEATURE_CONTENT) {
1059010595
text = feature.getProperties().TEXT_FEATURE_CONTENT;

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/TileVectorLayer.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,12 @@ export var TileVectorLayer = VectorGrid.extend({
215215

216216
//处理标签图层
217217
if (layerStyleInfo.textField) {
218-
feature.properties.textField = layerStyleInfo.textField;
218+
var textField = layerStyleInfo.textField;
219+
if (textField && textField.indexOf('.')) {
220+
var arr = textField.split('.');
221+
textField = arr && arr.length > 0 && arr[arr.length - 1];
222+
}
223+
feature.properties.textField = textField;
219224
}
220225

221226
me.vectorTileLayerStyles = me.vectorTileLayerStyles || {};

src/openlayers/core/StyleUtils.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@ export default class StyleUtils {
9292
text = feature.getProperties().texts[0];
9393
}
9494
if (layerInfo.type === 'LABEL') {
95-
text = feature.getProperties().attributes ? feature.getProperties().attributes[layerInfo.textField] : feature.getProperties()[layerInfo.textField];
95+
var textField = layerInfo.textField;
96+
if (textField && textField.indexOf('.')) {
97+
var arr = textField.split('.');
98+
textField = arr && arr.length > 0 && arr[arr.length - 1];
99+
}
100+
text = feature.getProperties().attributes ? feature.getProperties().attributes[textField] : feature.getProperties()[textField];
96101
}
97102
if (feature.getProperties().TEXT_FEATURE_CONTENT) {
98103
text = feature.getProperties().TEXT_FEATURE_CONTENT;

0 commit comments

Comments
 (0)