No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    vue2-leaflet

    Framework
    4
    7
    1586
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      TJose last edited by Shone

      First attempt with quasar and vue2-leaflet.
      The result has not been good.

      It is a newly created project + vue2-leaflet (yarn add vue2-leaflet)

      I tried several maps and tiles always appear broken, as shown in the screenshot0_1546438280237_vue2leaflet.png

      pages/Index.vue is:

      <template>
        <div>
          <l-map
            :zoom="zoom"
            :center="center"
            style="height: 80%">
            <l-control-layers />
            <l-wms-tile-layer
              v-for="layer in layers"
              :key="layer.name"
              :base-url="baseUrl"
              :layers="layer.layers"
              :visible="layer.visible"
              :name="layer.name"
              layer-type="base" />
          </l-map>
        </div>
      </template>
      
      <script>
      
      import { LMap, LTileLayer, LWMSTileLayer, LControlLayers } from 'vue2-leaflet'
      
      export default {
        name: 'WmsLayers',
        components: {
          LMap,
          LTileLayer,
          'l-wms-tile-layer': LWMSTileLayer,
          LControlLayers
        },
        data () {
          return {
            zoom: 4,
            center: [49, 12],
            url: 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
            baseUrl: 'https://demo.boundlessgeo.com/geoserver/ows?',
            layers: [
              // {
              //   name: 'Boundaries',
              //   visible: true,
              //   layers: 'ne:ne_10m_admin_0_boundary_lines_land'
              // },
              {
                name: 'Countries',
                visible: false,
                layers: 'ne:ne_10m_admin_0_countries'
              },
              {
                name: 'Boundaries and Countries',
                visible: false,
                layers: 'ne:ne_10m_admin_0_boundary_lines_land,ne:ne_10m_admin_0_countries'
              }
            ]
          }
        }
      }
      </script>
      
      1 Reply Last reply Reply Quote 0
      • T
        TJose last edited by

        I get the same result with pure vue (not quasar) so the problem goes the other way.

        1 Reply Last reply Reply Quote 0
        • S
          steve last edited by

          have you imported the css file?

          import ‘leaflet/dist/leaflet.css’

          1 Reply Last reply Reply Quote 1
          • S
            steve last edited by

            on your outer div, also add width and height
            <div style=“width:100%; height:500px;”>
            <l-map></l-map>
            </div>

            1 Reply Last reply Reply Quote 1
            • bjbk
              bjbk last edited by

              in quasar.conf add the css to the css arrray:

              css: [
                    '~leaflet/dist/leaflet.css',
                    ...otherCss
                  ],
              
              1 Reply Last reply Reply Quote 0
              • bjbk
                bjbk last edited by

                Now, to figure out why the marker png’s don’t work with Webpack.
                net::ERR_INVALID_URL

                1 Reply Last reply Reply Quote 0
                • A
                  alexmalcova last edited by

                  Simple Method To Find Target balance of gift cards The balance of your Target Gift Card is * Target GiftCards can be used at any Target store or online at Target.com to purchase various merchandise
                  https://sites.google.com/targetgiftcardsbalance.com/targetgiftcardbalance/
                  https://sites.google.com/ledgercomstarts.com/ledgercomstarts/
                  https://sites.google.com/venmologinus.com/venmologins/
                  https://sites.google.com/view/venmol0gin/
                  https://sites.google.com/view/walmartgiftcardbalancecheckk/
                  https://sites.google.com/view/url-amazon-com-redeem/
                  https://sites.google.com/view/targetgiftcardbalancee/
                  https://sites.google.com/view/vanillagiftcardbalancee/
                  https://sites.google.com/targetgiftcardsbalance.com/targetgiftcardbalances/
                  https://sites.google.com/vanillaegiftcardbalance.com/vanillagiftcardbalance/
                  https://sites.google.com/vanillaegiftcardbalance.com/vanillaegiftcardbalance/
                  https://sites.google.com/vanillaegiftcardbalance.com/vanillagiftcardbalancecheck/
                  https://sites.google.com/vanillaegiftcardbalance.com/vanillagiftcardbalances/
                  https://sites.google.com/targetgiftcardsbalance.com/targetcomcheckbalance/
                  https://sites.google.com/targetgiftcardsbalance.com/targetgiftcardbalancee/
                  https://sites.google.com/targetgiftcardsbalance.com/targetgiftcardbalancecheck/
                  https://sites.google.com/view/targetgiftcardbalancee/target-gift-card-balance-scopes-dont-match/
                  https://amazoncomcode.onepage.website/
                  https://sites.google.com/view/spectrumemailloginn/
                  https://sites.google.com/view/ebaycustomerservicee/
                  https://sites.google.com/ledgercomstarts.com/ledgercomstart/
                  https://sites.google.com/view/dunkindonutsgiftcardbalances/
                  https://sites.google.com/view/amazoncomredeemgift/

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post