Gathering detailed insights and metrics for @uiw/react-amap-circle-marker
Gathering detailed insights and metrics for @uiw/react-amap-circle-marker
npm install @uiw/react-amap-circle-marker
Typescript
Module System
Node Version
NPM Version
67.4
Supply Chain
90.8
Quality
84.2
Maintenance
100
Vulnerability
100
License
TypeScript (97.28%)
HTML (2.27%)
Less (0.24%)
CSS (0.14%)
Shell (0.06%)
Total Downloads
44,087
Last Day
22
Last Week
218
Last Month
920
Last Year
11,512
444 Stars
683 Commits
70 Forks
6 Watching
11 Branches
19 Contributors
Minified
Minified + Gzipped
Latest Version
7.1.3
Package Id
@uiw/react-amap-circle-marker@7.1.3
Unpacked Size
17.04 kB
Size
4.76 kB
File Count
12
NPM Version
10.8.2
Node Version
20.17.0
Publised On
20 Sept 2024
Cumulative downloads
Total Downloads
Last day
15.8%
22
Compared to previous day
Last week
36.3%
218
Compared to previous week
Last month
5.9%
920
Compared to previous month
Last year
-37.3%
11,512
Compared to previous year
构造一个圆形覆盖物。可直接满足创建圆形标注的需要。
AMap.CircleMarker 类与 AMap.Circle 类均为在地图上绘制圆形覆盖物的方法。这两类的根本不同在于 AMap.Circle 为矢量图形类,随地图的缩放会改变大小;而 AMap.CircleMarker 类则不会随图面缩放而改变。
1import { CircleMarker } from '@uiw/react-amap'; 2// 或者单独安装使用 3import { CircleMarker } from '@uiw/react-amap-circle-marker';
1import ReactDOM from 'react-dom'; 2import React, { useState, useRef } from 'react'; 3import { Map, APILoader, CircleMarker } from '@uiw/react-amap'; 4 5const Example = () => { 6 const [show, setShow] = useState(true); 7 return ( 8 <> 9 <button onClick={() => setShow(!show)}> 10 {show ? '隐藏' : '显示'} 11 </button> 12 <div style={{ width: '100%', height: '400px' }}> 13 <Map zoom={4} center={[116.400274, 39.905812]}> 14 <CircleMarker 15 center={new AMap.LngLat(116.407394, 39.904211)} 16 visible={show} 17 radius={10+Math.random()*10} 18 strokeColor="#fff" 19 strokeWeight={2} 20 strokeOpacity={0.5} 21 fillColor='rgba(0,0,255,1)' 22 fillOpacity={0.5} 23 zIndex={10} 24 bubble={true} 25 cursor='pointer' 26 clickable= {true} 27 /> 28 <CircleMarker 29 center={new AMap.LngLat(113.26641, 23.132324)} 30 visible={show} 31 radius={10+Math.random()*10} 32 strokeColor="#fff" 33 strokeWeight={2} 34 strokeOpacity={0.5} 35 fillColor='rgba(0,0,255,1)' 36 fillOpacity={0.5} 37 zIndex={10} 38 bubble={true} 39 cursor='pointer' 40 clickable= {true} 41 /> 42 <CircleMarker 43 center={new AMap.LngLat(112.562678, 37.873499)} 44 visible={show} 45 radius={10+Math.random()*10} 46 strokeColor="#fff" 47 strokeWeight={2} 48 strokeOpacity={0.5} 49 fillColor='rgba(0,0,255,1)' 50 fillOpacity={0.5} 51 zIndex={10} 52 bubble={true} 53 cursor='pointer' 54 clickable= {true} 55 /> 56 <CircleMarker 57 center={new AMap.LngLat(121.473662, 31.230372)} 58 visible={show} 59 radius={10+Math.random()*10} 60 strokeColor="#fff" 61 strokeWeight={2} 62 strokeOpacity={0.5} 63 fillColor='rgba(0,0,255,1)' 64 fillOpacity={0.5} 65 zIndex={10} 66 bubble={true} 67 cursor='pointer' 68 clickable= {true} 69 /> 70 <CircleMarker 71 center={new AMap.LngLat(117.329949, 31.733806)} 72 visible={show} 73 radius={10+Math.random()*10} 74 strokeColor="#fff" 75 strokeWeight={2} 76 strokeOpacity={0.5} 77 fillColor='rgba(0,0,255,1)' 78 fillOpacity={0.5} 79 zIndex={10} 80 bubble={true} 81 cursor='pointer' 82 clickable= {true} 83 /> 84 </Map> 85 </div> 86 </> 87 ); 88} 89 90const Mount = () => ( 91 <APILoader akey="a7a90e05a37d3f6bf76d4a9032fc9129"> 92 <Example /> 93 </APILoader> 94); 95 96export default Mount;
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
visible | 覆盖物是否可见。 | boolean | - |
center | 圆心位置 | LngLat | - |
radius | 圆半径,单位:px 最大值64 | number | - |
zIndex | 多边形覆盖物的叠加顺序。地图上存在多个多边形覆盖物叠加时,通过该属性使级别较高的多边形覆盖物在上层显示 | number | 10 |
bubble | 是否将覆盖物的鼠标或touch等事件冒泡到地图上(自v1.3 新增) | boolean | false |
cursor | 指定鼠标悬停时的鼠标样式,自定义cursor,IE仅支持cur/ani/ico格式,Opera不支持自定义cursor | string | - |
strokeColor | 轮廓线颜色,使用16进制颜色代码赋值 | string | #00D3FC |
strokeOpacity | 轮廓线透明度,取值范围 [0,1] | number | 0.9 |
strokeWeight | 轮廓线宽度 | number | - |
fillColor | 多边形填充颜色,使用16进制颜色代码赋值 | string | #00B2D5 |
fillOpacity | 多边形填充透明度,取值范围 [0,1] | number | 0.5 |
draggable | 设置多边形是否可拖拽移动 | boolean | false |
extData | 用户自定义属性,支持JavaScript API任意数据类型,如Polygon的id等 | any | - |
参数 | 说明 | 类型 |
---|---|---|
onHide | 隐藏 | (): void; |
onShow | 显示 | (): void; |
onMouseover | 鼠标经过 | (event: MapsEvent): void; |
onTouchend | 触摸结束时触发事件,仅适用移动设备 | (event: MapsEvent): void; |
onClick | 鼠标左键单击事件 | (event: MapsEvent): void; |
onTouchmove | 触摸移动进行中时触发事件,仅适用移动设备 | (event: MapsEvent): void; |
onRightclick | 鼠标右键单击事件 | (event: MapsEvent): void; |
onMouseup | 鼠标抬起 | (event: MapsEvent): void; |
onMouseout | 鼠标移出 | (event: MapsEvent): void; |
onTouchstart | 触摸开始时触发事件,仅适用移动设备 | (event: MapsEvent): void; |
onMousedown | 鼠标按下 | (event: MapsEvent): void; |
onDblclick | 鼠标左键双击事件 | (event: MapsEvent): void; |
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
packaging workflow detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Found 6/30 approved changesets -- score normalized to 2
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-01-20
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More