1.1.0 • Published 3 years ago

tmx-map-lib v1.1.0

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

tmx-map

Project setup

yarn install

Compiles and hot-reloads for development

yarn serve

Compiles and minifies for production

yarn build

Lints and fixes files

yarn lint

Customize configuration

See Configuration Reference.

Usage

  import { GoogleMap, BaiduMap } from "tmx-map-lib";

  Vue.use(GoogleMap, {
    load: {
      key: "your google key", 
      libraries: ["places", "geometry", "visualization"],
      language: "en",
    },
  });

  Vue.use(BaiduMap, {
    ak: "your baidu ak",
  });

  <google-map
      ref="googleMap"
      style="width: 100%; height: 400px"
      :center="{ lat: 22.54, lng: 114.05 }"
      :zoom="12"
      :options="{
        mapTypeId: 'satellite',
      }"
    >
    </google-map>

    <baidu-map
      ref="baiduMap"
      style="width: 100%; height: 400px"
      :center="{ lat: 22.54, lng: 114.05 }"
      :zoom="12"
    >
    </baidu-map>

    let lat = 37.774546;
    let lng = -122.433523;
    
    // this.$refs.googleMap.$mapObject is google map instance
    let sanFrancisco = new google.maps.LatLng(lat, lng);
    this.$refs.googleMap.$mapObject.setCenter(sanFrancisco);

    // this.$refs.baiduMap.$mapObject is baidu map instance
    let point = new BMap.Point(lng, lat);
    this.$refs.baiduMap.$mapObject.setCenter(point);
    
1.0.19

3 years ago

1.1.0

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.20

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago