Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demo(google-map): minor clarity tweaks to the dev-app demo #17647

Merged
merged 1 commit into from Nov 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/dev-app/google-map/BUILD.bazel
@@ -1,13 +1,21 @@
package(default_visibility = ["//visibility:public"])

load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module", "sass_binary")

ng_module(
name = "google-map",
srcs = glob(["**/*.ts"]),
assets = ["google-map-demo.html"],
assets = [
"google-map-demo.html",
":google_map_demo_scss",
],
deps = [
"//src/google-maps",
"@npm//@angular/router",
],
)

sass_binary(
name = "google_map_demo_scss",
src = "google-map-demo.scss",
)
36 changes: 19 additions & 17 deletions src/dev-app/google-map/google-map-demo.html
@@ -1,18 +1,20 @@
<google-map height="400px"
width="750px"
[center]="center"
[zoom]="zoom"
(mapClick)="handleClick($event)"
(mapMousemove)="handleMove($event)"
(mapRightclick)="handleRightclick()">
<map-marker></map-marker>
<map-marker #marker
*ngFor="let markerPosition of markerPositions"
[position]="markerPosition"
[options]="markerOptions"
(mapClick)="clickMarker(marker)"></map-marker>
<map-info-window [position]="infoWindowPosition">Testing 1 2 3</map-info-window>
</google-map>
<div class="demo-google-map">
<google-map height="400px"
width="750px"
[center]="center"
[zoom]="zoom"
(mapClick)="handleClick($event)"
(mapMousemove)="handleMove($event)"
(mapRightclick)="handleRightclick()">
<map-marker #firstMarker [position]="center" (mapClick)="clickMarker(firstMarker)"></map-marker>
<map-marker #marker
*ngFor="let markerPosition of markerPositions"
[position]="markerPosition"
[options]="markerOptions"
(mapClick)="clickMarker(marker)"></map-marker>
<map-info-window>Testing 1 2 3</map-info-window>
</google-map>

<div>Latitude: {{display?.lat}}</div>
<div>Longitude: {{display?.lng}}</div>
<p><label>Latitude:</label> {{display?.lat}}</p>
<p><label>Longitude:</label> {{display?.lng}}</p>
</div>
5 changes: 5 additions & 0 deletions src/dev-app/google-map/google-map-demo.scss
@@ -0,0 +1,5 @@
.demo-google-map {
label {
font-weight: 500;
}
}
2 changes: 1 addition & 1 deletion src/dev-app/google-map/google-map-demo.ts
Expand Up @@ -13,14 +13,14 @@ import {MapInfoWindow, MapMarker} from '@angular/google-maps';
@Component({
selector: 'google-map-demo',
templateUrl: 'google-map-demo.html',
styleUrls: ['google-map-demo.css']
})
export class GoogleMapDemo {
@ViewChild(MapInfoWindow) infoWindow: MapInfoWindow;

center = {lat: 24, lng: 12};
markerOptions = {draggable: false};
markerPositions: google.maps.LatLngLiteral[] = [];
infoWindowPosition: google.maps.LatLngLiteral;
zoom = 4;
display?: google.maps.LatLngLiteral;

Expand Down