Skip to content

Commit 2c4dc1f

Browse files
authored
README.md final (?) cleanup
1 parent 667d45d commit 2c4dc1f

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ Modify your view by adding the `xmlns:maps="nativescript-google-maps-sdk"` names
129129
markerEndDragging="onMarkerEndDragging"
130130
markerDrag="onMarkerDrag"
131131
cameraChanged="onCameraChanged"
132-
cameraMove="onCameraMove" />
132+
cameraMove="onCameraMove"
133+
/>
133134
</GridLayout>
134135
</Page>
135136
```
@@ -192,7 +193,7 @@ Use `gMap.setStyle(style);` to set the map's styling ([Google Maps Style Referen
192193

193194
### Angular
194195

195-
Use `this.mapView.setStyle(<Style>JSON.parse(this.styles));` inside of the `onMapReady` function. In this example `this.mapView` is the imported `MapView` from the plugin and `this.styles` is a reference to a json file that was created using the link below. The `<Style>` was also imported from the plugin as `{ Style }`.
196+
Use `this.mapView.setStyle(<Style>JSON.parse(this.styles));` inside of the `onMapReady` event handler. In this example, `this.mapView` is the `MapView` object and `this.styles` is a reference to a JSON file that was created using the [Styling Wizard](https://mapstyle.withgoogle.com/). The `<Style>` type was imported from the plugin as `{ Style }`.
196197

197198
## Basic Example
198199

@@ -202,22 +203,22 @@ Use `this.mapView.setStyle(<Style>JSON.parse(this.styles));` inside of the `onMa
202203
var mapsModule = require("nativescript-google-maps-sdk");
203204
204205
function onMapReady(args) {
205-
var mapView = args.object;
206-
207-
console.log("Setting a marker...");
208-
var marker = new mapsModule.Marker();
209-
marker.position = mapsModule.Position.positionFromLatLng(-33.86, 151.20);
210-
marker.title = "Sydney";
211-
marker.snippet = "Australia";
212-
marker.userData = { index : 1};
213-
mapView.addMarker(marker);
214-
215-
// Disabling zoom gestures
216-
mapView.settings.zoomGesturesEnabled = false;
206+
var mapView = args.object;
207+
208+
console.log("Setting a marker...");
209+
var marker = new mapsModule.Marker();
210+
marker.position = mapsModule.Position.positionFromLatLng(-33.86, 151.20);
211+
marker.title = "Sydney";
212+
marker.snippet = "Australia";
213+
marker.userData = { index : 1};
214+
mapView.addMarker(marker);
215+
216+
// Disabling zoom gestures
217+
mapView.settings.zoomGesturesEnabled = false;
217218
}
218219
219220
function onMarkerSelect(args) {
220-
console.log("Clicked on " +args.marker.title);
221+
console.log("Clicked on " +args.marker.title);
221222
}
222223
223224
function onCameraChanged(args) {

0 commit comments

Comments
 (0)