
Security News
The Next Open Source Security Race: Triage at Machine Speed
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.
@uiw/react-amap-map-type-control
Advanced tools
地图类型切换插件。用户通过该插件进行地图切换。
import { MapTypeControl } from '@uiw/react-amap';
// 或者单独安装使用
import { MapTypeControl } from '@uiw/react-amap-map-type-control';
import ReactDOM from 'react-dom';
import React, { useState, useRef } from 'react';
import { Map, APILoader, MapTypeControl } from '@uiw/react-amap';
const Demo = () => {
const [show, setShow] = useState(true);
return (
<>
<button onClick={() => setShow(!show)}>
{show ? '隐藏' : '显示'}
</button>
<div style={{ width: '100%', height: '300px' }}>
<Map>
<MapTypeControl
visible={show}
offset={[30, 10]}
position="RT"
/>
{show && (
<MapTypeControl
visible={show}
offset={[10, 10]}
position="RB"
/>
)}
</Map>
</div>
</>
);
}
const Mount = () => (
<APILoader akey="a7a90e05a37d3f6bf76d4a9032fc9129">
<Demo />
</APILoader>
);
export default Mount;
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| visible | 覆盖物是否可见。 | boolean | - |
| showRoad | 覆盖物是否可见。 | boolean | false |
| showTraffic | 叠加实时交通图层 默认值:false | boolean | false |
| defaultType | 初始化默认图层类型。 取值为0:默认底图 取值为1:卫星图 默认值:0 | number | 0 |
FAQs
用于在地图上弹出一个详细信息展示窗体,地图上只允许同时展示 `1` 个信息窗体。
The npm package @uiw/react-amap-map-type-control receives a total of 281 weekly downloads. As such, @uiw/react-amap-map-type-control popularity was classified as not popular.
We found that @uiw/react-amap-map-type-control demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.

Security News
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.