Skip to content

LocationControl

andy.rothwell edited this page Aug 31, 2018 · 2 revisions

LocationControl

In a Vue template

The <location-control> tag is put inside a <map_> tag:

<map_>
  ...
  <!-- location control -->
  <div v-once>
    <location-control v-once
                      v-if="this.geolocationEnabled"
                      :position="'bottomright'"
    />
  </div>

  <!-- location marker -->
  <circle-marker v-if="this.$store.state.map.location.lat != null"
                 :latlng="this.locationMarker.latlng"
                 :radius="this.locationMarker.radius"
                 :fillColor="this.locationMarker.fillColor"
                 :color="this.locationMarker.color"
                 :weight="this.locationMarker.weight"
                 :opacity="this.locationMarker.opacity"
                 :fillOpacity="this.locationMarker.fillOpacity"
                 :key="Math.random()"
  />
  ...
</map_>

In a Mapboard config file

Including the following will add the locationControl and circleMarker

geolocation: {
  enabled: false
},