
Security News
/Company News
Socket Is Sponsoring Composer and Packagist
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.
地图SDK加载器,支持腾讯地图和百度地图,可用于vue和react项目。
百度地图可选择使用react-baidu-maps,vue-baidu-map
npm install load-map --save
import LoadMap from 'load-map';
LoadMap.load({
mapKey: 'xxxxx', // 你申请的key
version: '2.exp', // 地图版本,
url: 'https://map.qq.com/api/js', // 地图SDK的URL,不包含查询部分
query: {}, // 加载地图SDK,额外的URL查询部分(百度地图有type: webgl)
}).then(sdk => {
// qqmapEl是腾讯地图的容器
// myOptions 腾讯地图的配置
new sdk.maps.Map(qqmapEl, myOptions);
})
加载地图SDK,返回Promise,成功回调里面参数为SDK
mapKey:
【String】 必填,地图平台申请的key
version:
【String】 地图版本,腾讯地图(例:2.exp),百度地图(例:1.0)
url:
【String】 地图SDK的URL,腾讯地图(例:'https://map.qq.com/api/js')默认值,百度地图(例:'https://api.map.baidu.com/api')
query:
【Object】加载地图SDK,额外的URL查询部分,腾讯地图不需要配置,百度地图JavaScript API GL版{type: 'webgl'}
FAQs
地图SDK加载器,支持腾讯地图和百度地图,可用于vue和react项目。
The npm package load-map receives a total of 3 weekly downloads. As such, load-map popularity was classified as not popular.
We found that load-map 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
/Company News
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.

Research
/Security News
Benign-looking npm packages split malicious functionality across a dependency chain that deploys a cross-platform RAT targeting Alibaba developers.

Research
/Security News
Two Joyfill npm beta releases contain an import-time implant that uses blockchain transactions to retrieve a remote-access trojan.