2019-10-28 13:18:25 +00:00
|
|
|
// import { Component, OnInit,Input } from '@angular/core';
|
|
|
|
//import { MapComponent } from 'ngx-openlayers';
|
|
|
|
//import OLCesium from 'olcs/OLCesium.js';
|
|
|
|
|
|
|
|
|
|
|
|
// @Component({
|
2019-11-04 12:34:00 +00:00
|
|
|
// selector: 'fm-map-switch2d3d',
|
2019-10-28 13:18:25 +00:00
|
|
|
// template: '<div (click)="handleClick($event)" class="rounded-circle twotreed">{{label}}</div>',
|
|
|
|
// styles: [`.twotreed {
|
|
|
|
// width:2.5em;
|
|
|
|
// height:2.5em;
|
|
|
|
// background-color: white;
|
|
|
|
// text-align:center;
|
|
|
|
// line-height:2.5em;
|
|
|
|
// font-weight:bold;
|
|
|
|
// cursor:default;}`]
|
|
|
|
|
|
|
|
// })
|
|
|
|
// export class Switch2D3DComponent {
|
|
|
|
|
|
|
|
// @Input() enable:boolean;
|
|
|
|
// public label: string = "3D";
|
|
|
|
// private ol3d: OLCesium;
|
|
|
|
|
|
|
|
|
|
|
|
// constructor(private map: MapComponent) {
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// ngOnInit() {
|
|
|
|
// this.ol3d = new OLCesium({ map: this.map.instance }); // ol2dMap is the ol.Map instance
|
|
|
|
// }
|
|
|
|
|
|
|
|
// handleClick(event) {
|
|
|
|
// this.enable = !this.enable;
|
|
|
|
// if (this.enable)
|
|
|
|
// this.ol3d.setEnabled(this.enable);
|
|
|
|
// this.label = this.enable?"2D":"3D";
|
|
|
|
// }
|
|
|
|
// }
|