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

vuleaflet

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vuleaflet

简介:

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

简介:

vue3 版本的 leaflet 组件, leaflet 版本基于 @1.9.3

安装
npm i vuleaflet -S
使用

main.js中引入并全局注册

import Vuleaflet from 'vuleaflet';
import 'vuleaflet/lib/style.css';

app.use(Vuleaflet);

在需要使用的组件中使用

<script setup>
const onReady = (mapInstance) => {
	console.log(mapInstance);
	console.log('L', L);
};
</script>

<template>
	<div class="wrapper">
		<VuLeaflet @onReady="onReady" />
	</div>
</template>

<style scoped>
.wrapper {
	width: 1200px;
	height: 400px;
	margin: 100px auto;
}
</style>
属性
属性名类型默认值说明
zoomNumber5地图缩放级别
centerArray | Object{ lat: 36.58, lng: 98.97 }地图中心点
showBaseLayerBooleantrue是否加载地图,默认使用天地图影像
configObject{}其他额外参数,透传 leaflet 初始化参数的 Options 选项
方法
方法名称说明回调参数
onReady底图初始化完成后的回调,第一个参数为地图实例Function(mapInstance)

Keywords

vuleaflet

FAQs

Package last updated on 13 Jan 2023

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