@wmfs/quasar-map-mapbox

MapBox wrapped as a Quasar component

Usage no npm install needed!

<script type="module">
  import wmfsQuasarMapMapbox from 'https://cdn.skypack.dev/@wmfs/quasar-map-mapbox';
</script>

README

quasar-map-mapbox

Tymly Cardscript CircleCI npm (scoped) Dependabot badge Commitizen friendly JavaScript Style Guide license

MapBox wrapped as a Quasar Component

Install

$ npm install @wmfs/quasar-map-mapbox --save

Usage

<template>
  <q-map
    centre-latitude=...  // initial centre
    centre-longitude=... 
    :locked=true|false   // whether the map can be panned and clicked 
    >
    <q-map-circle
      latitude=...  // marker position
      longitude=... 
      color=...  // optional
      id=...     // optional
      :locked=true|false // whether this marker can be dragged and moved around 
  </q-map>
</template>
<script>
import QMap from '@wmfs/quasar-map-mapbox'

export default {
  ...
  components: { QMap, ... }
  ...
}
</script>

A map may have many markers.

All parameters are optional.

If the QMap's centre-latitude and centre-longitude are not defined, the map will attempt to centre of the mid-point of its markers.

Build

Define the MAPBOX_ACCESS_TOKEN environment variable at build time.

License

MIT