0.2.0 • Published 4 years ago

@mapbox-start/vue-bridge v0.2.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

react-bridge

mapbox-gl vue bridge

Necessary

1. <script src="https://api.mapbox.com/mapbox-gl-js/v1.12.0/mapbox-gl.js"></script>
   <link href="https://api.mapbox.com/mapbox-gl-js/v1.12.0/mapbox-gl.css" rel="stylesheet" />
2. "vue": "2.x","uuid": "8.x","lodash": "4.x"

Install

yarn add @mapbox-start/vue-bridge

Usage

import {
  SpecMap,
  SpecMarker,
  SpecPopup,
  SpecSourceGeoJSON,
  SpecLayerSymbol,
  SpecLayerEvent,
} from "@mapbox-start/vue-bridge";

//marker popup
<SpecMap {...props}>
  <SpecMarker />
  <SpecPopup />
</SpecMap>;

//source layer
<SpecSourceGeoJSON>
  <SpecLayerSymbol>
    <SpecLayerEvent />
  </SpecLayerSymbol>
</SpecSourceGeoJSON>;

详细 demo