Installations
npm install @uiw/react-amap-circle
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
20.17.0
NPM Version
10.8.2
Score
67.1
Supply Chain
83.5
Quality
83.8
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (97.28%)
HTML (2.27%)
Less (0.24%)
CSS (0.14%)
Shell (0.06%)
Developer
Download Statistics
Total Downloads
44,478
Last Day
23
Last Week
217
Last Month
925
Last Year
11,488
GitHub Statistics
444 Stars
683 Commits
70 Forks
6 Watching
11 Branches
19 Contributors
Bundle Size
2.14 kB
Minified
971.00 B
Minified + Gzipped
Sponsor this package
Package Meta Information
Latest Version
7.1.3
Package Id
@uiw/react-amap-circle@7.1.3
Unpacked Size
11.91 kB
Size
3.66 kB
File Count
12
NPM Version
10.8.2
Node Version
20.17.0
Publised On
20 Sept 2024
Total Downloads
Cumulative downloads
Total Downloads
44,478
Last day
4.5%
23
Compared to previous day
Last week
30.7%
217
Compared to previous week
Last month
-0.1%
925
Compared to previous month
Last year
-38.7%
11,488
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Circle 圆形组件
构造圆形对象,通过 CircleOptions 指定多边形样式
1import { Circle } from '@uiw/react-amap'; 2// 或者单独安装使用 3import { Circle } from '@uiw/react-amap-circle';
基本用法
1import ReactDOM from 'react-dom'; 2import React, { useState } from 'react'; 3import { Map, APILoader, Circle } 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: '300px' }}> 13 <Map zoom={14} center={[116.400274, 39.905812]}> 14 <Circle 15 visible={show} 16 radius={1000} 17 strokeColor="#fff" 18 strokeWeight={2} 19 center={new AMap.LngLat(116.39,39.9)} 20 /> 21 </Map> 22 </div> 23 </> 24 ); 25} 26 27const Mount = () => ( 28 <APILoader akey="a7a90e05a37d3f6bf76d4a9032fc9129"> 29 <Example /> 30 </APILoader> 31); 32 33export default Mount;
Props
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
visible | 覆盖物是否可见。 | boolean | - |
radius | 圆半径,单位:米 | number | - |
事件
参数 | 说明 | 类型 |
---|---|---|
onHide | 隐藏 | (): void; |
onShow | 显示 | (): void; |
onRightClick | 鼠标右键单击事件 | (event: MapsEvent): void; |
onClick | 鼠标左键单击事件 | (event: MapsEvent): void; |
onTouchEnd | 鼠标左键单击事件 | (event: MapsEvent): void; |
onDblClick | 鼠标左键双击事件 | (event: MapsEvent): void; |
onTouchMove | 触摸移动进行中时触发事件,仅适用移动设备 | (event: MapsEvent): void; |
onTouchStart | 触摸开始时触发事件,仅适用移动设备 | (event: MapsEvent): void; |
onMouseOut | 鼠标移出 | (event: MapsEvent): void; |
onMouseOver | 鼠标经过 | (event: MapsEvent): void; |
onMouseUp | 鼠标抬起 | (event: MapsEvent): void; |
onMouseDown | 鼠标按下 | (event: MapsEvent): void; |
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
packaging workflow detected
Details
- Info: Project packages its releases by way of GitHub Actions.: .github/workflows/ci.yml:8
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/ci.yml:1
- Info: no jobLevel write permissions found
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
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/uiwjs/react-amap/ci.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/uiwjs/react-amap/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/uiwjs/react-amap/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:265: update your workflow using https://app.stepsecurity.io/secureworkflow/uiwjs/react-amap/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:271: update your workflow using https://app.stepsecurity.io/secureworkflow/uiwjs/react-amap/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:274: update your workflow using https://app.stepsecurity.io/secureworkflow/uiwjs/react-amap/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:282: update your workflow using https://app.stepsecurity.io/secureworkflow/uiwjs/react-amap/ci.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:290: update your workflow using https://app.stepsecurity.io/secureworkflow/uiwjs/react-amap/ci.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:22
- Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:24
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 6 third-party GitHubAction dependencies pinned
- Info: 0 out of 2 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 6 are checked with a SAST tool
Score
5.3
/10
Last Scanned on 2025-01-27
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