-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
stacytalbot
committed
Dec 17, 2019
1 parent
ab99cbb
commit ff56f85
Showing
9 changed files
with
119 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.map { | ||
&--main { | ||
@include gutters; | ||
|
||
.map { | ||
|
||
&__mapbox { | ||
height: rem-calc(700); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<template> | ||
<div :class="classes"> | ||
<v-map | ||
:mapbox-token="mapboxToken" | ||
class="map__mapbox" | ||
/> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import VMap from './VMap' | ||
export default { | ||
name: 'map-interactive', | ||
components: { VMap }, | ||
props: { | ||
classes: { | ||
type: String | ||
} | ||
}, | ||
data () { | ||
return { | ||
mapboxToken: process.env.MAPBOX_TOKEN | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<template> | ||
<div | ||
:id="id" | ||
/> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'v-map', | ||
props: { | ||
mapboxToken: { | ||
type: String, | ||
required: true | ||
} | ||
}, | ||
data () { | ||
return { | ||
id: 'map-target', | ||
mapbox: { | ||
accessToken: this.mapboxToken, | ||
} | ||
} | ||
}, | ||
mounted () { | ||
mapboxgl.accessToken = this.mapbox.accessToken | ||
const map = new mapboxgl.Map({ | ||
container: this.id, | ||
style: 'mapbox://styles/mapbox/streets-v11' | ||
}) | ||
this.map = map | ||
}, | ||
methods: { | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
</section> | ||
|
||
<section> | ||
map main | ||
<%= render partial: "partials/maps/main" %> | ||
</section> | ||
|
||
<section> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<map-interactive classes="map--main"></map-interactive> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters