Hide all pois

This commit is contained in:
ztimson 2019-07-22 13:07:05 -04:00
parent a0de11b453
commit 072200b415
2 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<toolbar [(menu)]="menu"></toolbar> <toolbar [(menu)]="menu"></toolbar>
<agm-map class="map" [mapTypeId]="style" [zoomControl]="false" [streetViewControl]="false" [disableDoubleClickZoom]="true" (mapReady)="mapApi = $event" gestureHandling="greedy" (mapClick)="mapClick.next($event.coords)"> <agm-map class="map" [styles]="mapStyle" [mapTypeId]="style" [zoomControl]="false" [streetViewControl]="false" [disableDoubleClickZoom]="true" (mapReady)="mapApi = $event" gestureHandling="greedy" (mapClick)="mapClick.next($event.coords)">
<ng-container *ngIf="position"> <ng-container *ngIf="position">
<agm-marker *ngIf="position.heading == null" [markerClickable]="false" [latitude]="position.latitude" [longitude]="position.longitude" [iconUrl]="{url: '/assets/images/dot.png', anchor: {x: 11, y: 10}}"></agm-marker> <agm-marker *ngIf="position.heading == null" [markerClickable]="false" [latitude]="position.latitude" [longitude]="position.longitude" [iconUrl]="{url: '/assets/images/dot.png', anchor: {x: 11, y: 10}}"></agm-marker>
<agm-marker *ngIf="position.heading != null" [markerClickable]="false" [latitude]="position.latitude" [longitude]="position.longitude" [iconUrl]="{url: '/assets/images/arrow.png', anchor: {x: 11, y: 13}, rotation: 90}"></agm-marker> <agm-marker *ngIf="position.heading != null" [markerClickable]="false" [latitude]="position.latitude" [longitude]="position.longitude" [iconUrl]="{url: '/assets/images/arrow.png', anchor: {x: 11, y: 13}, rotation: 90}"></agm-marker>

View File

@ -21,6 +21,13 @@ export class MapComponent {
drawListener = []; drawListener = [];
mapApi: any; mapApi: any;
mapClick = new BehaviorSubject<LatLngLiteral>(null); mapClick = new BehaviorSubject<LatLngLiteral>(null);
mapStyle = [{
"featureType": "poi",
"elementType": "labels",
"stylers": [{
"visibility": "off"
}]
}];
position: any; position: any;
showPalette = false; showPalette = false;
style = 'terrain'; style = 'terrain';