New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

v2-bmap-gl

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v2-bmap-gl

**作者:**pankunpeng

latest
Source
npmnpm
Version
0.0.9
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

**作者:**pankunpeng

**交流QQ:**2643139637

**组件名:**bmap-gl

**说明:**使用了v3的百度地图,将使用v2的BMap对象的vue-baidu-map组件改为新款使用v3的BMapGL,

使用方法:API部分借鉴vue-baidu-map文档 示例图: img.png 例子:

  • 注册
// main.js
Vue.use(BaiduMap,{
  ak:'ng1I9sDPeznpR8Ctln3GodvjgsTHpGi9'
})
<template>
	<bmap-gl
      class="map"
      :center="center"
      :zoom="zoom"
      @ready="ready"
      style="height:600px;width:100%"
    >
      <!-->缩放<-->
      <bmap-gl-zoom/>
      <!-->比例尺<-->
      <bmap-gl-scale/>
      <!-->地图类型<-->
      <bmap-gl-navigation/>
      <!-->定位<-->
      <bmap-gl-geolocation/>
      <!-->切换类型<-->
      <bmap-gl-map-type/>
      <!-->标注<-->
      <bmap-gl-marker
         v-if="item.newBuildStatus == 6"
         @click="clickEvent(item)"
         :position="{ lng: item.longitude, lat: item.latitude }"
         :icon="{
             url: 'xxx.png',
             size: { width: 20, height: 20 },
          }"
         >
    </bmap-gl>
</template>
<script>
export default{
    data() {
        return {
          center: {lng: 120, lat: 30},
          zoom: 16
        }
      },
    methods:{
        ready({BMapGL, map}) {
          // 相关操作
        },
    }
}
</script>

参考文档:介绍 预览 API

Keywords

baidu

FAQs

Package last updated on 23 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts