12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- // const _normalUrl = "http://115.91.94.42:8080/MAPDATA/YONGIN/Base/{z}/{x}/{y}.png";
- // const _satelliteUrl = "http://115.91.94.42:8080/MAPDATA/YONGIN/Satellite/{z}/{x}/{y}.jpeg";
- // const _hybridUrl = "http://115.91.94.42:8080/MAPDATA/YONGIN/Hybrid/{z}/{x}/{y}.png";
- const _normalUrl = "/MAPDATA/YONGIN/Base/{z}/{x}/{y}.png";
- const _satelliteUrl = "/MAPDATA/YONGIN/Satellite/{z}/{x}/{y}.jpeg";
- const _hybridUrl = "/MAPDATA/YONGIN/Hybrid/{z}/{x}/{y}.png";
- export class TMapConfig {
- constructor() {
- this.mapCenter = [127.109873, 37.283203];
- this.mapDefZoom = 14;
- this.mapMinZoom = 10;
- this.mapMaxZoom = 18;
- this.mapView = new ol.View({
- center: this.mapCenter,
- zoom: this.mapDefZoom,
- projection: "EPSG:4326",
- minZoom: this.mapMinZoom,
- maxZoom: this.mapMaxZoom,
- constrainResolution: true, // force zooming to a integer zoom
- });
- this.poiGroup = new ol.layer.Group({
- title: "시설물",
- visible: true,
- layers: [],
- });
- this.eventGroup = new ol.layer.Group({
- title: "이벤트",
- visible: false,
- layers: [],
- });
- this.trafGroup = new ol.layer.Group({
- title: "소통정보",
- visible: true,
- layers: [],
- });
- this.baseMapLyr = {
- normal: new ol.layer.Group({
- title: "일반",
- visible: true,
- layers: [
- new ol.layer.WebGLTile({
- source: new ol.source.XYZ({
- //attributions: ["©Vworld"],
- opaque: false,
- crossOrigin: "anonymous",
- url: _normalUrl,
- }),
- name: "normal",
- }),
- ],
- }),
- satellite: new ol.layer.Group({
- title: "위성+하이브리드",
- visible: false,
- layers: [
- new ol.layer.WebGLTile({
- source: new ol.source.XYZ({
- //attributions: ["©Vworld"],
- opaque: false,
- crossOrigin: "anonymous",
- url: _satelliteUrl,
- }),
- name: "satellite",
- }),
- new ol.layer.WebGLTile({
- source: new ol.source.XYZ({
- //attributions: ["©Vworld"],
- opaque: false,
- crossOrigin: "anonymous",
- url: _hybridUrl,
- }),
- name: "hybrid",
- }),
- ],
- }),
- };
- this.baseMapGroup = new ol.layer.Group({
- title: "배경지도",
- visible: true,
- layers: [this.baseMapLyr.normal, this.baseMapLyr.satellite],
- });
- }
- }
|