Skip to content

Commit d08a69e

Browse files
committed
【API】【openlayers】增加MapboxStyle解析 相关例子
1 parent 6ce0945 commit d08a69e

30 files changed

+10268
-963
lines changed

build/webpack.config.openlayers.js

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var banner = `
99
version: v${pkg.version}
1010
`;
1111
module.exports = {
12-
mode:"production",
12+
mode: "production",
1313
//页面入口文件配置
1414
entry: {},
1515
//入口文件输出配置
@@ -19,13 +19,13 @@ module.exports = {
1919
},
2020

2121
//不显示打包文件大小相关警告
22-
performance:{
22+
performance: {
2323
hints: false
2424
},
2525

2626
//是否启用压缩
2727
optimization: {
28-
minimize:false
28+
minimize: false
2929
},
3030

3131
//其它解决方案配置
@@ -37,7 +37,28 @@ module.exports = {
3737
'echarts': 'function(){try{return echarts}catch(e){return {}}}()',
3838
'mapv': "function(){try{return mapv}catch(e){return {}}}()",
3939
'elasticsearch': 'function(){try{return elasticsearch}catch(e){return {}}}()',
40-
'@turf/turf': "function(){try{return turf}catch(e){return {}}}()"
40+
'@turf/turf': "function(){try{return turf}catch(e){return {}}}()",
41+
//for ol-mapbox-style
42+
'ol/style/style': 'ol.style.Style',
43+
'ol/style/circle': 'ol.style.Circle',
44+
'ol/style/icon': 'ol.style.Icon',
45+
'ol/style/stroke': 'ol.style.Stroke',
46+
'ol/style/fill': 'ol.style.Fill',
47+
'ol/style/text': 'ol.style.Text',
48+
'ol/geom/point': 'ol.geom.Point',
49+
'ol/proj': 'ol.proj',
50+
'ol/tilegrid': 'ol.tilegrid',
51+
'ol/format/geojson': 'ol.format.GeoJSON',
52+
'ol/format/mvt': 'ol.format.MVT',
53+
'ol/canvasmap': 'ol.CanvasMap',
54+
'ol/observable': 'ol.Observable',
55+
'ol/layer/tile': 'ol.layer.Tile',
56+
'ol/layer/vector': 'ol.layer.Vector',
57+
'ol/layer/vectortile': 'ol.layer.VectorTile',
58+
'ol/source/tilejson': 'ol.source.TileJSON',
59+
'ol/source/vector': 'ol.source.Vector',
60+
'ol/source/vectortile': 'ol.source.VectorTile',
61+
'ol/source/xyz': 'ol.source.XYZ'
4162
},
4263

4364
module: {
@@ -64,7 +85,7 @@ module.exports = {
6485
exclude: /classic/,
6586
loader: 'babel-loader',
6687
query: {
67-
presets: ['es2015']
88+
presets: ['env']
6889
}
6990
}, {
7091
test: /\.css$/,

dist/iclient9-leaflet.css

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-leaflet.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65800,13 +65800,14 @@ var EchartsLayer = exports.EchartsLayer = _leaflet2["default"].Layer.extend({
6580065800
var mapOffset = [offset.x || 0, offset.y || 0];
6580165801
viewportRoot.style.left = mapOffset[0] + 'px';
6580265802
viewportRoot.style.top = mapOffset[1] + 'px';
65803-
for (var item in ecLayers) {
65804-
if (!ecLayers.hasOwnProperty(item)) {
65805-
continue;
65806-
}
65807-
ecLayers[item] && clearContext(ecLayers[item].ctx);
65808-
}
65803+
6580965804
if (!me.options.loadWhileAnimating) {
65805+
for (var item in ecLayers) {
65806+
if (!ecLayers.hasOwnProperty(item)) {
65807+
continue;
65808+
}
65809+
ecLayers[item] && clearContext(ecLayers[item].ctx);
65810+
}
6581065811
me._enableEchartsContainer();
6581165812
}
6581265813

@@ -67372,7 +67373,7 @@ var WebMap = exports.WebMap = _leaflet2["default"].LayerGroup.extend({
6737267373
}
6737367374
}
6737467375
}
67375-
var newEpsgCode = me.mapInfo && me.mapInfo.epsgCode,
67376+
var newEpsgCode = '4326',
6737667377
oldEpsgCode = layerInfo.prjCoordSys && layerInfo.prjCoordSys.epsgCode;
6737767378
if (needTransform) {
6737867379
me.changeFeatureLayerEpsgCode(oldEpsgCode, newEpsgCode, layer, sFeaturesArr, function (features) {
@@ -71148,7 +71149,7 @@ module.exports = function (proj4) {
7114871149
/* 377 */
7114971150
/***/ (function(module) {
7115071151

71151-
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:\\dev\\iClient","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"};
71152+
module.exports = {"_args":[["proj4@2.3.15","E:\\git\\iClient9"]],"_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":"http://registry.npm.taobao.org/proj4/download/proj4-2.3.15.tgz","_spec":"2.3.15","_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":"~0.0.2"},"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"};
7115271153

7115371154
/***/ }),
7115471155
/* 378 */

dist/iclient9-leaflet.min.css

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-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.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)