35 lines
745 B
JavaScript
35 lines
745 B
JavaScript
import Vue from 'vue';
|
|
import VueRouter from 'vue-router';
|
|
|
|
import { Icon } from 'leaflet';
|
|
|
|
import App from './components/App.vue';
|
|
import Map from './components/Map.vue';
|
|
|
|
delete Icon.Default.prototype._getIconUrl;
|
|
|
|
Icon.Default.mergeOptions({
|
|
iconRetinaUrl: require('leaflet/dist/images/marker-icon-2x.png'),
|
|
iconUrl: require('leaflet/dist/images/marker-icon.png'),
|
|
shadowUrl: require('leaflet/dist/images/marker-shadow.png')
|
|
});
|
|
|
|
Vue.config.productionTip = false;
|
|
|
|
Vue.use(VueRouter);
|
|
|
|
const routes = [
|
|
{ name: "position", path: "/:lat/:lng", component: Map },
|
|
{ path: "/", redirect: '/45.751591/4.845695/' }
|
|
];
|
|
|
|
const router = new VueRouter({
|
|
routes
|
|
});
|
|
|
|
new Vue({
|
|
el: '#app',
|
|
render: h => h(App),
|
|
router,
|
|
});
|