Commit 166b3877 by amalk

30-082019

parent ade7f9b1
...@@ -49,3 +49,4 @@ export class HomePage implements OnInit { ...@@ -49,3 +49,4 @@ export class HomePage implements OnInit {
} }
} }
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
</div> </div>
<ion-content> <ion-content>
<div class="nearby_map"> <div class="nearby_map">
<agm-map [latitude]="lat" [longitude]="lng" [zoom]="10" [disableDefaultUI]="false" [zoomControl]="false" (mapClick)="mapClicked($event)" [backgroundColor] ="'rgba(29, 27, 130,0.2)'"> <agm-map [latitude]="lat" [longitude]="lng" [zoom]="10" [disableDefaultUI]="false" [zoomControl]="false" [backgroundColor] ="'rgba(29, 27, 130,0.2)'">
<agm-marker [iconUrl]="'/assets/nearby.png'" *ngFor="let m of markers; let i = index" (markerClick)="clickedMarker(m.label, i)" [latitude]="m.lat" [longitude]="m.lng" [label]="m.label" [markerDraggable]="m.draggable" (dragEnd)="markerDragEnd(m, $event)"> <agm-marker [iconUrl]="'/assets/nearby.png'" *ngFor="let m of markers; let i = index" [latitude]="m.lat" [longitude]="m.lng" [label]="m.label" [markerDraggable]="m.draggable">
<agm-info-window> <agm-info-window>
<div class="click_marker"> <div class="click_marker">
<h5>Lulufashion Store</h5> <h5>Lulufashion Store</h5>
......
...@@ -9,13 +9,16 @@ import { MouseEvent } from '@agm/core'; ...@@ -9,13 +9,16 @@ import { MouseEvent } from '@agm/core';
styleUrls: ['./nearby.page.scss'], styleUrls: ['./nearby.page.scss'],
}) })
export class NearbyPage implements OnInit { export class NearbyPage implements OnInit {
marker:any;
constructor( constructor(
private router: Router, private router: Router,
private route: ActivatedRoute, private route: ActivatedRoute,
private location: Location private location: Location
) { } ) { }
ngOnInit() {
}
// google maps zoom level // google maps zoom level
zoom: number = 8; zoom: number = 8;
...@@ -75,3 +78,10 @@ export class NearbyPage implements OnInit { ...@@ -75,3 +78,10 @@ export class NearbyPage implements OnInit {
window.history.back(); window.history.back();
} }
} }
interface marker {
lat: number;
lng: number;
label?: string;
draggable: boolean;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment