Skip to content

Commit 973a0f8

Browse files
mateuszRybczoneksdras
authored andcommitted
Cookbook - [14] - Follow up fixes (#1848)
1 parent 9542d5d commit 973a0f8

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/v2/cookbook/practical-use-of-scoped-slots.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Let’s first establish our `GoogleMapLoader.vue` template:
3636
Now, our script needs to pass some props to the component which allows us to set the [Google Maps API](https://developers.google.com/maps/documentation/javascript/reference/) and [Map object](https://developers.google.com/maps/documentation/javascript/reference/map#Map):
3737

3838
```js
39-
import GoogleMapsApiLoader from "google-maps-api-loader"
39+
import GoogleMapsApiLoader from 'google-maps-api-loader'
4040

4141
export default {
4242
props: {
@@ -61,7 +61,7 @@ export default {
6161

6262
methods: {
6363
initializeMap() {
64-
const mapContainer = this.$refs.googleMap)
64+
const mapContainer = this.$refs.googleMap
6565
this.map = new this.google.maps.Map(
6666
mapContainer, this.mapConfig
6767
)
@@ -96,7 +96,7 @@ Next up, our script needs to receive props from the parent component which will
9696
- [apiKey](https://developers.google.com/maps/documentation/javascript/get-api-key): Our personal api key required by Google Maps
9797

9898
```js
99-
import GoogleMapsApiLoader from "google-maps-api-loader"
99+
import GoogleMapsApiLoader from 'google-maps-api-loader'
100100

101101
export default {
102102
props: {
@@ -237,7 +237,7 @@ Now when we have our map ready we will create two factory components that will b
237237
`GoogleMapMarker.vue`
238238

239239
```js
240-
import { POINT_MARKER_ICON_CONFIG } from "@/constants/mapSettings"
240+
import { POINT_MARKER_ICON_CONFIG } from '@/constants/mapSettings'
241241

242242
export default {
243243
props: {
@@ -269,7 +269,7 @@ export default {
269269
`GoogleMapLine.vue`
270270

271271
```js
272-
import { LINE_PATH_CONFIG } from "@/constants/mapSettings"
272+
import { LINE_PATH_CONFIG } from '@/constants/mapSettings'
273273

274274
export default {
275275
props: {
@@ -340,9 +340,7 @@ Here we go, integrating the data points directly into the template:
340340
We need to import the required factory components in our script and set the data that will be passed to the markers and lines:
341341

342342
```js
343-
import {
344-
mapSettings
345-
} from '@/constants/mapSettings'
343+
import { mapSettings } from '@/constants/mapSettings'
346344

347345
export default {
348346
components: {
@@ -354,9 +352,9 @@ export default {
354352
data () {
355353
return {
356354
markers: [
357-
{ id: "a", position: { lat: 3, lng: 101 } },
358-
{ id: "b", position: { lat: 5, lng: 99 } },
359-
{ id: "c", position: { lat: 6, lng: 97 } },
355+
{ id: 'a', position: { lat: 3, lng: 101 } },
356+
{ id: 'b', position: { lat: 5, lng: 99 } },
357+
{ id: 'c', position: { lat: 6, lng: 97 } },
360358
],
361359
lines: [
362360
{ id: '1', path: [{ lat: 3, lng: 101 }, { lat: 5, lng: 99 }] },

0 commit comments

Comments
 (0)