Skip to content

Commit 856bf5f

Browse files
committed
feat(demo-maps): add view options for showFullExtent in demo
1 parent e43f52a commit 856bf5f

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

projects/demo-maps/src/app/route-components/route-example-projection/route-map2.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<main class="content-area map-view">
2-
<ukis-map-ol [layersSvc]="layersSvc" [mapState]="mapStateSvc" [controls]="controls" id="olMap"></ukis-map-ol>
2+
<ukis-map-ol [layersSvc]="layersSvc" [mapState]="mapStateSvc" [controls]="controls" [viewOptions]="viewOptions" id="olMap"></ukis-map-ol>
33
</main>
44

55
<clr-vertical-nav [clrVerticalNavCollapsible]="true" class="right" [clr-nav-level]="2">

projects/demo-maps/src/app/route-components/route-example-projection/route-map2.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Component, OnInit, HostBinding } from '@angular/core';
22
import { LayersService, RasterLayer, TGeoExtent, VectorLayer, WmtsLayer } from '@dlr-eoc/services-layers';
33
import { EPSG_3031_Def, EPSG_3995_Def, IProjDef, MapStateService, EPSG_3857_Def, EPSG_4326_Def, EPSG_3035_Def, adjustBBoxAxisToEnu } from '@dlr-eoc/services-map-state';
44
import { MapOlService, IMapControls, MapOlComponent } from '@dlr-eoc/map-ol';
5+
import { ViewOptions as olViewOptions } from 'ol/View';
56
import { OsmTileLayer } from '@dlr-eoc/base-layers-raster';
67

78
import { ClarityIcons, layersIcon, mapIcon, compassIcon } from '@clr/angular/icon';
@@ -22,6 +23,7 @@ ClarityIcons.addIcons(...[layersIcon, mapIcon, compassIcon]);
2223
export class RouteMap2Component implements OnInit {
2324
@HostBinding('class') class = 'content-container';
2425
controls: IMapControls;
26+
viewOptions: olViewOptions;
2527
projections: IProjDef[];
2628

2729
projectionSet = false;
@@ -36,6 +38,10 @@ export class RouteMap2Component implements OnInit {
3638
scaleLine: true
3739
};
3840

41+
this.viewOptions = {
42+
showFullExtent: true
43+
}
44+
3945
const SwissCH1903: IProjDef = {
4046
code: `EPSG:21781`,
4147
proj4js: '+proj=somerc +lat_0=46.9524055555556 +lon_0=7.43958333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs +type=crs',

0 commit comments

Comments
 (0)