Unverified Commit 76a2d2f5 authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera Committed by GitHub
Browse files

Merge pull request #70 from vue-leaflet/playground-polygon

Playground polygon
parents a7b66e4d 4697796d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
    <div class="menu">
      <router-link to="/">Home</router-link>
      <router-link to="/marker">Marker</router-link>
      <router-link to="/polygon">Polygon</router-link>
      <router-link to="/circle">Circle</router-link>
      <router-link to="/control-scale">Scale</router-link>
      <router-link to="/control-layers">Layers</router-link>
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ import Home from "./views/Home.vue";
const routes = [
  { path: "/", component: Home },
  { path: "/marker", component: () => import("./views/Marker.vue") },
  { path: "/polygon", component: () => import("./views/Polygon.vue") },
  { path: "/circle", component: () => import("./views/Circle.vue") },
  {
    path: "/control-scale",
@@ -22,6 +23,7 @@ const routes = [
    path: "/control-custom-message",
    component: () => import("./views/ControlCustomMessage.vue"),
  },

];

const router = createRouter({
+40 −0
Original line number Diff line number Diff line
<template>
  <l-map ref="map" v-model:zoom="zoom" :center="[24.886, -70.268]">
    <l-tile-layer
      url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
      layer-type="base"
      name="OpenStreetMap"
    ></l-tile-layer>

    <l-polygon
      :lat-lngs="[
        [25.774, -80.19],
        [18.466, -66.118],
        [32.321, -64.757],
        [25.774, -80.19],
      ]"
      color="#41b782"
      :fill="true"
      :fillOpacity="0.5"
      fillColor="#41b782"
    />
  </l-map>
</template>
<script>
import { LMap, LTileLayer, LPolygon } from "./../../components";

export default {
  components: {
    LMap,
    LTileLayer,
    LPolygon,
  },
  data() {
    return {
      zoom: 5,
    };
  },
};
</script>

<style></style>