mirror of https://gitee.com/antv-l7/antv-l7
parent
4ec2e2e0d7
commit
e9b2ed3074
12
package.json
12
package.json
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
"name": "@antv/l7",
|
||||
"version": "1.3.2",
|
||||
"version": "1.3.3",
|
||||
"description": "Large-scale WebGL-powered Geospatial Data Visualization",
|
||||
"main": "build/L7.js",
|
||||
"browser": "build/L7-min.js",
|
||||
"module": "lib/index.js",
|
||||
"homepage": "https://github.com/antvis/l7",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -57,6 +55,7 @@
|
|||
"rollup-plugin-node-builtins": "^2.1.2",
|
||||
"rollup-plugin-node-resolve": "^4.0.1",
|
||||
"rollup-plugin-postcss": "^2.0.3",
|
||||
"rollup-plugin-sourcemaps": "^0.4.2",
|
||||
"rollup-plugin-terser": "^4.0.4",
|
||||
"serve-static": "^1.13.2",
|
||||
"shelljs": "~0.7.8",
|
||||
|
@ -67,7 +66,7 @@
|
|||
"scripts": {
|
||||
"build-dev": "rollup -c --environment BUILD:dev",
|
||||
"watch-dev": "rollup -c --environment BUILD:dev --watch & npm run demos-web ",
|
||||
"build-prod": "rollup -c --environment BUILD:production",
|
||||
"build-prod": "rollup -c --environment BUILD",
|
||||
"build-prod-min": "rollup -c --environment BUILD:production,MINIFY:true",
|
||||
"build": "rollup -c --environment BUILD:production",
|
||||
"build-lib": "babel src --out-dir lib",
|
||||
|
@ -83,11 +82,11 @@
|
|||
"demos": "electron ./demos/app.js",
|
||||
"demos-web": "node ./demos/app.js --web --port 2046",
|
||||
"dev": "npm run watch & npm run demos-web",
|
||||
"dist": "npm run build-dev && npm run build-prod && npm run build-prod-min",
|
||||
"dist": "npm run build-prod && npm run build-prod-min",
|
||||
"lint": "eslint --ext .html,.js ./",
|
||||
"lint-fix": "eslint --ext .html,.js --fix ./",
|
||||
"mkdir-dist": "node ./bin/mkdir-dist.js",
|
||||
"prepublishOnly": "npm run build-lib && npm run dist",
|
||||
"prepublishOnly": "npm run dist",
|
||||
"screenshot": "node ./bin/screenshot.js",
|
||||
"start": "npm run watch-dev",
|
||||
"test": "torch --compile-opts ./.torch.compile.opts.js --compile --renderer --recursive test/unit",
|
||||
|
@ -106,7 +105,6 @@
|
|||
"silent": false
|
||||
},
|
||||
"dependencies": {
|
||||
"@antv/g": "^3.1.3",
|
||||
"@antv/geo-coord": "^1.0.8",
|
||||
"@antv/util": "~2.0.1",
|
||||
"@mapbox/geojson-rewind": "^0.4.0",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import fs from 'fs';
|
||||
import sourcemaps from 'rollup-plugin-sourcemaps';
|
||||
import json from 'rollup-plugin-json';
|
||||
import buble from 'rollup-plugin-buble';
|
||||
import resolve from 'rollup-plugin-node-resolve';
|
||||
|
@ -74,7 +75,7 @@ const config = [
|
|||
},
|
||||
treeshake: false,
|
||||
plugins: [
|
||||
// css()
|
||||
sourcemaps()
|
||||
]
|
||||
}
|
||||
];
|
||||
|
|
|
@ -130,6 +130,13 @@ export default class Scene extends Base {
|
|||
getMarkerContainer() {
|
||||
return this._markerContainier;
|
||||
}
|
||||
map2Png() {
|
||||
this.scene._engine.update();
|
||||
const vis = this.scene._engine._renderer.domElement.toDataURL();
|
||||
const map = this.scene.map.getContainer().getElementsByClassName('amap-layer')[0].toDataURL();
|
||||
return [ map, vis ];
|
||||
|
||||
}
|
||||
_registEvents() {
|
||||
const events = [
|
||||
'mouseout',
|
||||
|
|
|
@ -147,6 +147,9 @@ export default class GaodeMap extends Base {
|
|||
const lnglat = new AMap.LngLat(center[0], center[1]);
|
||||
return map.setZoomAndCenter(zoom, lnglat);
|
||||
};
|
||||
scene.setFeature = features => {
|
||||
return map.setFeature(features);
|
||||
};
|
||||
scene.setBounds = extent => {
|
||||
return map.setBounds(new AMap.Bounds([ extent[0], extent[1] ], [ extent[2], extent[3] ]));
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue