Gathering detailed insights and metrics for @uiw/react-baidu-map-panorama-control
Gathering detailed insights and metrics for @uiw/react-baidu-map-panorama-control
Gathering detailed insights and metrics for @uiw/react-baidu-map-panorama-control
Gathering detailed insights and metrics for @uiw/react-baidu-map-panorama-control
基于 React 封装的百度地图组件,支持 React Hook,帮助你轻松的接入地图到 React 项目中。
npm install @uiw/react-baidu-map-panorama-control
Typescript
Module System
Node Version
NPM Version
73.3
Supply Chain
92.8
Quality
79.1
Maintenance
100
Vulnerability
100
License
TypeScript (98.85%)
HTML (0.99%)
Less (0.14%)
Shell (0.03%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
232 Stars
522 Commits
22 Forks
6 Watchers
8 Branches
12 Contributors
Updated on Jul 10, 2025
Latest Version
2.7.3
Package Id
@uiw/react-baidu-map-panorama-control@2.7.3
Unpacked Size
10.14 kB
Size
3.04 kB
File Count
12
NPM Version
8.19.4
Node Version
20.19.1
Published on
May 02, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
全景地图控件。
1import { PanoramaControl, usePanoramaControl } from '@uiw/react-baidu-map'; 2// 或者单独安装使用 3import PanoramaControl, { usePanoramaControl } from '@uiw/react-baidu-map-panorama-control';
1import React, { useState } from 'react'; 2import { Map, APILoader, PanoramaControl } from '@uiw/react-baidu-map'; 3 4const Example = () => { 5 const [show, setShow] = useState(true); 6 return ( 7 <> 8 <button onClick={() => setShow(!show)}> 9 {show ? '关闭' : '开启'} 10 </button> 11 <Map zoom={13} style={{ height: 300 }}> 12 {show && ( 13 <PanoramaControl /> 14 )} 15 <PanoramaControl visiable={show} /> 16 </Map> 17 </> 18 ); 19} 20 21const Demo = () => ( 22 <div style={{ width: '100%' }}> 23 <APILoader akay="eYpCTECSntZmw0WyoQ7zFpCRR9cpgHFG"> 24 <Example /> 25 </APILoader> 26 </div> 27); 28 29export default Demo;
panoramaControl
, setPanoramaControl
1import React from 'react'; 2import { useRef, useEffect, useState } from 'react'; 3import { Map, APILoader, Provider, useMap, usePanoramaControl } from '@uiw/react-baidu-map'; 4 5const Example = () => { 6 const divElm = useRef(null); 7 const [show, setShow] = useState(true); 8 const { setContainer, map } = useMap(); 9 const { panoramaControl } = usePanoramaControl({ 10 map, anchor: BMAP_NAVIGATION_CONTROL_LARGE, visiable: show, 11 }); 12 13 useEffect(() => { 14 if (divElm.current && !map) { 15 setContainer(divElm.current); 16 } 17 }, [map]); 18 return ( 19 <> 20 <button onClick={() => setShow(!show)}> 21 {show ? '关闭' : '开启'} 22 </button> 23 <div ref={divElm} style={{ height: '100%' }} /> 24 </> 25 ); 26} 27 28const Demo = () => ( 29 <div style={{ width: '100%', height: '300px' }}> 30 <APILoader akay="eYpCTECSntZmw0WyoQ7zFpCRR9cpgHFG"> 31 <Provider> 32 <Example /> 33 </Provider> 34 </APILoader> 35 </div> 36); 37export default Demo;
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
visiable | 覆盖物是否可见。 | boolean | - |
无效 控件的位置偏移值。 | ControlAnchor | BMAP_ANCHOR_TOP_RIGHT | |
无效 控件的水平偏移值。 | BMap.Size | - |
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
2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1
Reason
Found 0/24 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
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-07-07
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