@antv/l7-maps
Advanced tools
Comparing version 2.0.0-beta.15 to 2.0.0-beta.16
@@ -6,2 +6,10 @@ # Change Log | ||
# [2.0.0-beta.16](https://github.com/antvis/L7/compare/v2.0.0-beta.15...v2.0.0-beta.16) (2019-11-29) | ||
**Note:** Version bump only for package @antv/l7-maps | ||
# [2.0.0-beta.15](https://github.com/antvis/L7/compare/v2.0.0-beta.14...v2.0.0-beta.15) (2019-11-29) | ||
@@ -8,0 +16,0 @@ |
var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3, _temp; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); } | ||
@@ -222,3 +232,4 @@ | ||
async init() { | ||
const { | ||
const _this$config = this.config, | ||
{ | ||
id, | ||
@@ -228,14 +239,14 @@ style = 'light', | ||
maxZoom = 18, | ||
token = AMAP_API_KEY, | ||
...rest | ||
} = this.config; | ||
token = AMAP_API_KEY | ||
} = _this$config, | ||
rest = _objectWithoutProperties(_this$config, ["id", "style", "minZoom", "maxZoom", "token"]); | ||
this.$mapContainer = this.creatAmapContainer(id); | ||
await new Promise(resolve => { | ||
const resolveMap = () => { | ||
this.map = new AMap.Map(this.$mapContainer, { | ||
this.map = new AMap.Map(this.$mapContainer, _objectSpread({ | ||
mapStyle: this.getMapStyle(style), | ||
zooms: [minZoom, maxZoom], | ||
viewMode: '3D', | ||
...rest | ||
}); | ||
viewMode: '3D' | ||
}, rest)); | ||
this.map.on('camerachange', this.handleCameraChanged); | ||
@@ -242,0 +253,0 @@ resolve(); |
var _dec, _dec2, _class, _descriptor, _descriptor2, _temp; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); } | ||
@@ -31,5 +37,5 @@ | ||
sceneContainer.bind(TYPES.MapConfig).toConstantValue({ ...this.config, | ||
sceneContainer.bind(TYPES.MapConfig).toConstantValue(_objectSpread({}, this.config, { | ||
id | ||
}); | ||
})); | ||
sceneContainer.bind(TYPES.IMapService).to(this.getServiceConstructor()).inSingletonScope(); | ||
@@ -36,0 +42,0 @@ } |
var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3, _temp; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); } | ||
@@ -182,3 +192,4 @@ | ||
async init() { | ||
const { | ||
const _this$config = this.config, | ||
{ | ||
id = 'map', | ||
@@ -188,15 +199,15 @@ attributionControl = false, | ||
token = 'pk.eyJ1IjoieGlhb2l2ZXIiLCJhIjoiY2pxcmc5OGNkMDY3cjQzbG42cXk5NTl3YiJ9.hUC5Chlqzzh0FFd_aEc-uQ', | ||
rotation = 0, | ||
...rest | ||
} = this.config; | ||
rotation = 0 | ||
} = _this$config, | ||
rest = _objectWithoutProperties(_this$config, ["id", "attributionControl", "style", "token", "rotation"]); | ||
this.$mapContainer = document.getElementById(id); | ||
this.viewport = new Viewport(); | ||
mapboxgl.accessToken = token; | ||
this.map = new mapboxgl.Map({ | ||
this.map = new mapboxgl.Map(_objectSpread({ | ||
container: id, | ||
style: this.getMapStyle(style), | ||
attributionControl, | ||
bearing: rotation, | ||
...rest | ||
}); | ||
bearing: rotation | ||
}, rest)); | ||
this.map.on('load', this.handleCameraChanged); | ||
@@ -203,0 +214,0 @@ this.map.on('move', this.handleCameraChanged); |
@@ -22,2 +22,12 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); } | ||
@@ -237,3 +247,4 @@ | ||
async init() { | ||
const { | ||
const _this$config = this.config, | ||
{ | ||
id, | ||
@@ -243,14 +254,14 @@ style = 'light', | ||
maxZoom = 18, | ||
token = AMAP_API_KEY, | ||
...rest | ||
} = this.config; | ||
token = AMAP_API_KEY | ||
} = _this$config, | ||
rest = _objectWithoutProperties(_this$config, ["id", "style", "minZoom", "maxZoom", "token"]); | ||
this.$mapContainer = this.creatAmapContainer(id); | ||
await new Promise(resolve => { | ||
const resolveMap = () => { | ||
this.map = new AMap.Map(this.$mapContainer, { | ||
this.map = new AMap.Map(this.$mapContainer, _objectSpread({ | ||
mapStyle: this.getMapStyle(style), | ||
zooms: [minZoom, maxZoom], | ||
viewMode: '3D', | ||
...rest | ||
}); | ||
viewMode: '3D' | ||
}, rest)); | ||
this.map.on('camerachange', this.handleCameraChanged); | ||
@@ -257,0 +268,0 @@ resolve(); |
@@ -12,2 +12,8 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); } | ||
@@ -40,5 +46,5 @@ | ||
sceneContainer.bind(_l7Core.TYPES.MapConfig).toConstantValue({ ...this.config, | ||
sceneContainer.bind(_l7Core.TYPES.MapConfig).toConstantValue(_objectSpread({}, this.config, { | ||
id | ||
}); | ||
})); | ||
sceneContainer.bind(_l7Core.TYPES.IMapService).to(this.getServiceConstructor()).inSingletonScope(); | ||
@@ -45,0 +51,0 @@ } |
@@ -24,2 +24,12 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); } | ||
@@ -198,3 +208,4 @@ | ||
async init() { | ||
const { | ||
const _this$config = this.config, | ||
{ | ||
id = 'map', | ||
@@ -204,15 +215,15 @@ attributionControl = false, | ||
token = 'pk.eyJ1IjoieGlhb2l2ZXIiLCJhIjoiY2pxcmc5OGNkMDY3cjQzbG42cXk5NTl3YiJ9.hUC5Chlqzzh0FFd_aEc-uQ', | ||
rotation = 0, | ||
...rest | ||
} = this.config; | ||
rotation = 0 | ||
} = _this$config, | ||
rest = _objectWithoutProperties(_this$config, ["id", "attributionControl", "style", "token", "rotation"]); | ||
this.$mapContainer = document.getElementById(id); | ||
this.viewport = new _Viewport.default(); | ||
_mapboxGl.default.accessToken = token; | ||
this.map = new _mapboxGl.default.Map({ | ||
this.map = new _mapboxGl.default.Map(_objectSpread({ | ||
container: id, | ||
style: this.getMapStyle(style), | ||
attributionControl, | ||
bearing: rotation, | ||
...rest | ||
}); | ||
bearing: rotation | ||
}, rest)); | ||
this.map.on('load', this.handleCameraChanged); | ||
@@ -219,0 +230,0 @@ this.map.on('move', this.handleCameraChanged); |
{ | ||
"name": "@antv/l7-maps", | ||
"version": "2.0.0-beta.15", | ||
"version": "2.0.0-beta.16", | ||
"description": "", | ||
@@ -26,4 +26,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@antv/l7-core": "^2.0.0-beta.15", | ||
"@antv/l7-utils": "^2.0.0-beta.13", | ||
"@antv/l7-core": "^2.0.0-beta.16", | ||
"@antv/l7-utils": "^2.0.0-beta.16", | ||
"gl-matrix": "^3.1.0", | ||
@@ -40,3 +40,3 @@ "inversify": "^5.0.1", | ||
}, | ||
"gitHead": "a21759211ce52abb20383981a9f2dcec58e9672d", | ||
"gitHead": "6f61c9aafb7705ce64f6329c1c33c6138356eb47", | ||
"publishConfig": { | ||
@@ -43,0 +43,0 @@ "access": "public" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
174954
1755