Upgrade cesium to 1.97
This commit is contained in:
parent
bce562fb8e
commit
eb1b8f18eb
@ -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/")
|
||||
}
|
||||
}
|
||||
};
|
1106
package-lock.json
generated
1106
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -29,9 +29,12 @@
|
||||
"@ngrx/store": "^14",
|
||||
"@popperjs/core": "^2.11.6",
|
||||
"angular-oauth2-oidc": "^13",
|
||||
"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",
|
||||
"https-browserify": "^1.0.0",
|
||||
"moment": "^2.29.4",
|
||||
"ngrx-store-localstorage": "^14",
|
||||
"ngx-avatar": "^4.1.0",
|
||||
@ -43,8 +46,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.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.synchronize();
|
||||
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