@skymapglobal/map-measurement

Requires Drawer Module

Usage no npm install needed!

<script type="module">
  import skymapglobalMapMeasurement from 'https://cdn.skypack.dev/@skymapglobal/map-measurement';
</script>

README

Skymap Map Module - Measurement Control

Install

Requires Drawer Module

yarn add @skymapglobal/map-drawer
yarn add @skymapglobal/map-measurement

Usage

<template>
  <map>
    <BaseMapControl position="top-right" />

    <DrawControl>
      <MeasurementControl position="top-right" />
    </DrawControl>
  </map>
</template>

<script>
  import { Map, BaseMapControl } from "@skymapglobal/map";
  import { DrawControl } from "@skymapglobal/map-drawer";
  import { MeasurementControl } from "@skymapglobal/map-measurement";

  export default {
    components: {
      Map,
      BaseMapControl,
      DrawControl,
      MeasurementControl,
      MouseCoordinatesControl,
    },
  };
</script>

API

Props

  • styles: Object - Default:

    {
      distance: {
        line: {
          "line-color": "red",
          "line-width": 2,
        }
      },
      area: {
        fill: {
          "fill-color": "#000",
          "fill-opacity": 0.2,
        }
        outline: {
          "line-color": "red",
          "line-width": 2,
        }
      }
    }