
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
react-mobile-amap
Advanced tools
react-amap是一套基于React 和高德地图的地图组件。
npm i -S react-mobile-amap
引入react-amap
// 引入react-amap
import ReactAMap from 'react-amap';
// 初始化react-amap
ReactAMap.initAMapLoader({
// 高德的key
key: 'YOUR_KEY',
// 插件集合
plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor']
});
const screen = window.screen.height;
let AMap = null;
const parameters = {
base: {
zoom: 11,
center: [
121.474704,
31.22789
],
},
style: {
height: screen + 'px'
},
scale: {
visible: true,
},
// toolBar: {
// visible: true,
// locate: true,
// autoPosition: false,
// },
autoPosition: true,
markers: [
{
icon: 'http://webapi.amap.com/theme/v1.3/markers/n/mark_b1.png',
position: [116.2054671, 39.907761]
},
{
icon: 'http://webapi.amap.com/theme/v1.3/markers/n/mark_b2.png',
position: [116.368904, 39.913423]
},
{
icon: 'http://webapi.amap.com/theme/v1.3/markers/n/mark_b3.png',
position: [116.305467, 39.807761]
}
],
marker: {
fitView: true
},
onLoad: (map) => {
AMap = map;
},
onMapMove: (map) => {
},
onLocationComplete: (data) => {
console.log(data);
},
onLocationError: (data) => {
console.log(data);
}
};
const click = function () {
AMap.panBy(50, 100);
};
ReactDOM.render(
<div>
<AMapContainer {...parameters} />
<button onClick={click} style={{height:'200px',background:'#ccc'}}>click</button>
</div>,
document.getElementById('root')
);
FAQs
>react amap
We found that react-mobile-amap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.