Upgrade cesium to 1.97
This commit is contained in:
parent
b76a933dba
commit
4872dee094
@ -4,9 +4,12 @@ module.exports = {
|
||||
// Resolve node module use of fs
|
||||
fs: "empty",
|
||||
Buffer: false,
|
||||
http: "empty",
|
||||
https: "empty",
|
||||
zlib: "empty"
|
||||
http: require.resolve("stream-http"),
|
||||
https: require.resolve("https-browserify"),
|
||||
url: require.resolve("url/"),
|
||||
zlib: require.resolve('browserify-zlib'),
|
||||
assert: require.resolve("assert/"),
|
||||
util: require.resolve("util/")
|
||||
}
|
||||
}
|
||||
};
|
15
package.json
15
package.json
@ -28,11 +28,14 @@
|
||||
"@ngrx/router-store": "^12.0",
|
||||
"@ngrx/store": "^12.0",
|
||||
"angular-oauth2-oidc": "^12.0",
|
||||
"assert": "^2.0.0",
|
||||
"bootstrap": "^4.6.0",
|
||||
"cesium": "^1.82.1",
|
||||
"browserify-zlib": "^0.2.0",
|
||||
"cesium": "^1.97.0",
|
||||
"core-js": "^2.6.12",
|
||||
"moment": "^2.29.1",
|
||||
"ngrx-store-localstorage": "^12.0",
|
||||
"https-browserify": "^1.0.0",
|
||||
"moment": "^2.29.4",
|
||||
"ngrx-store-localstorage": "^14",
|
||||
"ngx-avatar": "^4.1.0",
|
||||
"ngx-clipboard": "^14.0.1",
|
||||
"ngx-image-cropper": "^3.3.5",
|
||||
@ -42,8 +45,12 @@
|
||||
"ol-cesium": "^2.13.1",
|
||||
"resumablejs": "^1.1.0",
|
||||
"rxjs": "^6.6.7",
|
||||
"stream": "^0.0.2",
|
||||
"stream-http": "^3.2.0",
|
||||
"tassign": "^1.0.0",
|
||||
"tslib": "^2.2.0",
|
||||
"tslib": "^2.4.0",
|
||||
"url": "^0.11.0",
|
||||
"util": "^0.12.4",
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -1,4 +1,7 @@
|
||||
import { Component, OnInit,Input,Host } from '@angular/core';
|
||||
import { OldCircularArc } from 'arcgis-rest-api';
|
||||
import { Map } from 'ol';
|
||||
import { Interaction} from 'ol/interaction';
|
||||
import { MapComponent } from 'ngx-openlayers';
|
||||
import OLCesium from 'ol-cesium';
|
||||
|
||||
@ -16,6 +19,7 @@ export class Switch2D3DComponent {
|
||||
private ol3d: OLCesium;
|
||||
private synchronizers:any[];
|
||||
public loading:boolean = true;
|
||||
private interactions:Interaction[] = [];
|
||||
|
||||
|
||||
constructor(private map: MapComponent) {
|
||||
@ -41,12 +45,33 @@ export class Switch2D3DComponent {
|
||||
});
|
||||
}
|
||||
|
||||
disableInteractions() {
|
||||
this.interactions=[];
|
||||
this.map.instance.getInteractions().forEach((i) => {
|
||||
if(i.getActive()) {
|
||||
this.interactions.push(i);
|
||||
i.setActive(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
enableInteractions() {
|
||||
this.interactions.forEach((i) => {
|
||||
i.setActive(true);
|
||||
});
|
||||
}
|
||||
|
||||
handleClick(event) {
|
||||
this.enable = !this.enable;
|
||||
if(this.enable) {
|
||||
this.disableInteractions();
|
||||
this.synchronize();
|
||||
this.ol3d.setEnabled(true);
|
||||
} else {
|
||||
this.ol3d.setEnabled(false);
|
||||
this.enableInteractions();
|
||||
}
|
||||
this.ol3d.setEnabled(this.enable);
|
||||
|
||||
this.label = this.enable?"2D":"3D";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user