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.18
  • 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'

// 组件内引入
components: { CoordPicker }

// 全局引入
Vue.use(CoordPicker) 

Quick Start

<CoordPicker :show.sync="" apiKey=""/>
AttributeDescriptionConfiguration ModeTypeAccepted ValuesDefault
show.sync开关propsbooleanfalse
apiKey高德地图js api keyprops, globalstring
city初始地区props, globalstring城市名称 / 省份名称
address.sync地址propsstring
lng.sync经度propsnumber / string
lat.sync纬度propsnumber / string
zoom.sync缩放级别propsnumber
precision坐标精度(保留几位小数)props, globalnumber6
addressComponent地址成分 可以指定选中的address是否包含省/市/区props, globalobject{ province:true, city:true, district:true }
img图片链接(用于图片图层)propsstring
imgNorthEastLng.sync图片东北角经度(用于图片图层)propsnumber / string
imgNorthEastLat.sync图片东北角纬度(用于图片图层)propsnumber / string
imgSouthWestLng.sync图片西南角经度(用于图片图层)propsnumber / string
imgSouthWestLat.sync图片西南角纬度(用于图片图层)propsnumber / string
boundary.sync区域轮廓(用于绘制区域)propsarray

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

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

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


boundary格式

[
  // 轮廓1
  {
    data: [
      { 'longitude': '106.44294', 'latitude': '26.644338' },
      { 'longitude': '106.431267', 'latitude': '26.504937' },
      { 'longitude': '106.569282', 'latitude': '26.585405' }
    ]
  },
  // 轮廓1 
  {
    data: [
      { 'longitude': '106.623527', 'latitude': '26.52767' },
      { 'longitude': '106.602241', 'latitude': '26.415188' },
      { 'longitude': '106.721031', 'latitude': '26.472979' }
    ]
  }
]

Keywords

FAQs

Package last updated on 04 Dec 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