Unverified Commit 93c87bb6 authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera Committed by GitHub
Browse files

Merge pull request #64 from vue-leaflet/playground-controls-custom-message

Playground controls custom message
parents caa31c5f 5778d8f1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
      <router-link to="/">Home</router-link>
      <router-link to="/marker">Marker</router-link>
      <router-link to="/circle">Circle</router-link>
      <router-link to="/control-custom-message">Custom Message</router-link>
    </div>
    <div class="map-wrapper">
      <router-view />
+4 −0
Original line number Diff line number Diff line
@@ -8,6 +8,10 @@ const routes = [
  { path: "/", component: Home },
  { path: "/marker", component: () => import("./views/Marker.vue") },
  { path: "/circle", component: () => import("./views/Circle.vue") },
  {
    path: "/control-custom-message",
    component: () => import("./views/ControlCustomMessage.vue"),
  },
];

const router = createRouter({
+32 −0
Original line number Diff line number Diff line
<template>
  <l-map ref="map" :zoom="2" :center="[47.41322, -1.219482]">
    <l-tile-layer
      url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
      layer-type="base"
      name="OpenStreetMap"
    ></l-tile-layer>
    <l-control class="leaflet-control leaflet-demo-control"
      >Hello, Map!</l-control
    >
  </l-map>
</template>
<script>
import { LMap, LTileLayer, LControl } from "./../../components";

export default {
  components: {
    LMap,
    LTileLayer,
    LControl,
  },
};
</script>

<style>
.leaflet-demo-control {
  background: white;
  border: 1px solid steelblue;
  border-radius: 0.6em;
  padding: 0.5em;
}
</style>