Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
coord-picker
Advanced tools
Dependencies: vue element-ui
// 全局引入
import 'coord-picker/dist/style.css'
import CoordPicker from 'coord-picker'
Vue.use(CoordPicker, {
// 全局配置
})
<!-- 局部引入 -->
<template>
<CoordPicker v-bind="config"/>
</template>
<script>
import 'coord-picker/dist/style.css'
import CoordPicker from 'coord-picker'
export default {
components: { CoordPicker },
data () {
return {
config: {
// 局部配置
}
}
}
}
</script>
Attribute | Description | Type | Accepted Values | Default |
---|---|---|---|---|
show.sync | 开关 | boolean | false | |
apiKey | 高德地图 js api key | string | ||
city* | 初始行政区 | string | ||
zoom.sync | 缩放级别 | number | ||
precision | 坐标精度(保留几位小数) | number | 6 | |
addressComponent* | 地址成分 | object, function |
Attribute | Description | Type | Accepted Values | Default |
---|---|---|---|---|
lng.sync | 经度 | number, string | ||
lat.sync | 纬度 | number, string | ||
address.sync | 地址 | string |
Attribute | Description | Type | Accepted Values | Default |
---|---|---|---|---|
marker.sync* | 点位列表 | object[] | ||
markerCount* | 点位数量限制 | number, number[] | 1 |
Attribute | Description | Type | Accepted Values | Default |
---|---|---|---|---|
img | 图片url | string | ||
imgNorthEastLng.sync | 图片东北角经度 | number, string | ||
imgNorthEastLat.sync | 图片东北角纬度 | number, string | ||
imgSouthWestLng.sync | 图片西南角经度 | number, string | ||
imgSouthWestLat.sync | 图片西南角纬度 | number, string |
Attribute | Description | Type | Accepted Values | Default |
---|---|---|---|---|
boundary.sync* | 区域轮廓列表 | object[] | ||
boundaryCount* | 区域数量限制 | number, number[] | 0 |
::: warning 坐标值类型
number和string都能接收 但返回时 由于js的number类型存在精度丢失问题 故返回string
:::
高德Web服务API的同名参数
可选值:指定城市的中文(如北京)、指定城市的中文全拼(beijing)、citycode(010)、adcode(110000),不支持县级市。当指定城市查询内容为空时,会进行全国范围内的地址转换检索。
adcode信息可参考城市编码表获取
数量上限
number[]
默认情况下,点击地图获取到的address是包含省市区的完整地址,你可以用以下两种方式来自定义地址的成分:
{
province: true, // address中是否包含省
city: true, // address中是否包含市
district: true // address中是否包含区县
}
返回格式:
[
// 轮廓1
{
data: [
{ 'longitude': '106.44294', 'latitude': '26.644338' },
{ 'longitude': '106.431267', 'latitude': '26.504937' },
{ 'longitude': '106.569282', 'latitude': '26.585405' }
]
},
// 轮廓2
{
data: [
{ 'longitude': '106.623527', 'latitude': '26.52767' },
{ 'longitude': '106.602241', 'latitude': '26.415188' },
{ 'longitude': '106.721031', 'latitude': '26.472979' }
]
}
]
v-model
/ value
/ *.sync
)仅支持局部配置权重:
<!-- 多点位示例 -->
<template>
<CoordPicker
show
apiKey=""
:marker.sync="marker"
:markerCount="2"
/>
</template>
<script>
export default {
data () {
return {
marker: [{
lng: '',
lat: '',
address: '',
name: ''
}]
}
}
}
</script>
img参数不为空时 开启绘制图层功能
图层数量目前仅支持一个,二次绘制会覆盖先前的图层
boundaryCount参数值大于0时 开启绘制轮廓功能
高德、腾讯地图通用的 GCJ-02
1.4.15(2.0存在诸多问题,性能也不如1.x,等待后续更新)
FAQs
Coordinates picker for AMap & TMap.
The npm package coord-picker receives a total of 22 weekly downloads. As such, coord-picker popularity was classified as not popular.
We found that coord-picker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.