File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -120,3 +120,30 @@ exports.onMapReady = onMapReady;
120
120
exports.onMarkerSelect = onMarkerSelect;
121
121
exports.onCameraChanged = onCameraChanged;
122
122
```
123
+
124
+ ## Angular
125
+
126
+ ```
127
+ import {Component, ElementRef, ViewChild} from '@angular/core';
128
+ import {registerElement} from "nativescript-angular/element-registry";
129
+
130
+ registerElement("MapView", () => require("nativescript-google-maps-sdk").MapView);
131
+
132
+ @Component({
133
+ selector: 'google-maps-example',
134
+ template: `
135
+ <GridLayout>
136
+ <MapView (mapReady)="onMapReady($event)"></MapView>
137
+ </GridLayout>
138
+ `
139
+ })
140
+ export class GoogleMapsExample {
141
+
142
+ @ViewChild("MapView") mapView: ElementRef;
143
+
144
+ //Map events
145
+ onMapReady = (event) => {
146
+ console.log("Map Ready");
147
+ };
148
+ }
149
+ ```
You can’t perform that action at this time.
0 commit comments