Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-mobile-amap
Advanced tools
Readme
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
The npm package react-mobile-amap receives a total of 0 weekly downloads. As such, react-mobile-amap popularity was classified as not popular.
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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.