Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

coord-picker

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coord-picker

高德/腾讯地图坐标拾取器 / A coordinates picker for amap/tmap

  • 0.1.16
  • npm
  • Socket score

Version published
Weekly downloads
144
increased by433.33%
Maintainers
1
Weekly downloads
 
Created
Source

coord-picker / 坐标拾取

图片

Features

  • √ 坐标拾取(双向绑定)
  • √ 拖拉拽绘制/编辑图片图层(双向绑定角坐标)
  • √ 拖拉拽绘制/编辑多边形(双向绑定轮廓坐标)
  • √ POI搜索、搜索关键字自动补全
  • √ 支持全局安装/单独引入
  • √ 定位灵活:根据传参情况智能初始化至合适的位置

Installation

NPM

$ yarn add coord-picker

依赖:vue element-ui


全局引入

import 'coord-picker/dist/coord-picker.css'
import CoordPicker from 'coord-picker'
Vue.use(CoordPicker)

局部引入

import 'coord-picker/dist/coord-picker.css'
import { CoordPicker } from 'coord-picker'
components: { CoordPicker }

Quick Start

<CoordPicker :show.sync="" apiKey=""/>
参数说明是否支持全局配置类型可选值默认值
show.sync开关Booleanfalse
apiKey高德地图js api key支持String
city初始地区支持String城市名称 / 省份名称
address.sync地址String
lng.sync经度Number / String
lat.sync纬度Number / String
zoom.sync缩放级别Number
precision坐标精度(保留几位小数)支持Number6
addressComponent地址成分 可以指定选中的address是否包含省/市/区支持Object{ province:true, city:true, district:true }
img图片链接(用于图片图层)String
imgNorthEastLng.sync图片东北角经度(用于图片图层)Number / String
imgNorthEastLat.sync图片东北角纬度(用于图片图层)Number / String
imgSouthWestLng.sync图片西南角经度(用于图片图层)Number / String
imgSouthWestLat.sync图片西南角纬度(用于图片图层)Number / String
boundary.sync区域轮廓(用于绘制区域)Array

坐标系:高德/腾讯地图通用的GCJ-02

高德JS-API版本:1.4.15(曾采用动态版本,但2.0存在诸多问题,性能也不如1.x,等待后续更新吧)

坐标值类型:Number和String都能接收 但返回时 由于js的Number类型存在精度丢失问题 故返回String

Keywords

FAQs

Package last updated on 20 Aug 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc