Skip to content

Commit

Permalink
Map added
Browse files Browse the repository at this point in the history
  • Loading branch information
tosh823 committed Nov 27, 2017
1 parent 45ff715 commit c11d077
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 24 deletions.
31 changes: 16 additions & 15 deletions src/components/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,24 @@
</template>

<style scoped>
</style>

<script>
import ModelViewComponent from "./model-view.vue";
import MapComponent from "./map.vue";
import ControlComponent from "./control.vue";
import ModelViewComponent from "./model-view.vue";
import MapComponent from "./map.vue";
import ControlComponent from "./control.vue";
export default {
data() {
return {};
},
computed: {},
methods: {},
components: {
ModelViewComponent: ModelViewComponent,
ControlComponent: ControlComponent,
MapComponent: MapComponent
}
};
export default {
data() {
return {};
},
computed: {},
methods: {},
components: {
ModelViewComponent: ModelViewComponent,
ControlComponent: ControlComponent,
MapComponent: MapComponent
}
};
</script>
25 changes: 16 additions & 9 deletions src/components/map.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="border border-secondary rounded h-100">
<p>Map</p>
<div id="map" class="h-100 w-100"></div>
</div>
</template>

Expand All @@ -9,12 +9,19 @@
</style>

<script>
export default {
data() {
return {};
},
computed: {},
methods: {},
components: {}
};
export default {
data() {
return {};
},
mounted: function() {
var uluru = { lat: 65.011543, lng: 25.468772 };
var map = new google.maps.Map(document.getElementById("map"), {
zoom: 16,
center: uluru
});
},
computed: {},
methods: {},
components: {}
};
</script>
2 changes: 2 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ"
crossorigin="anonymous"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDOe9dKqs4SncEEOg5hAFDULxOlkGcsu6Y"></script>


</body>

Expand Down

0 comments on commit c11d077

Please sign in to comment.