npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ido-team/map-awesome

v1.1.3

Published

```javascript @param divId const instance = new window.IdoMapInstance("map") ```

Downloads

239

Readme

##地图渲染层API

1.new 实例化

@param  divId
const instance = new window.IdoMapInstance("map")

2.加载地图

@param settings  完整数据集或者地图code
renderMap(settings)

3.切换瓦片图层组

@param tileName 瓦片组名称
switchTileLayer(tileName)

4.渲染地图图层

@param layers 图层id数组或者对象数组 [id] | [{id: '', request?: {params?: {}, data?: {}}]
参数示例:
[
  123,
  {
    id: '123',
    request: {
      data: {
        enterprise_id: '456'
      }
    }
  },
  {
    id: '123',
    request: {
      params: {
        enterprise_id: '456'
      }
    }
  }
]
@param replaceAll 可选参数 默认true 为替换渲染  false为追加渲染
renderMapLayer(layers, replaceAll)

5.渲染固定图层

@param layers 同4方法
renderStaticMapLayer(layers)

6.移除图层

@param layerIds 图层id数组
@param remove 可选参数 默认false  是否从数据集中删除
removeMapLayers(layerIds, remove)

7.添加图层

@param layers 参数同4方法
addMapLayer(layers)

8.设置层级

@param zoom 层级
setZoom(zoom)

9. 飞往某点

@param latlng 经纬度对象
@param zoom 可选参数 层级
flyTo(latlng, zoom?)

10.获取地图实例

getMapInstance()

11. 销毁地图实例

destroyed()

##地图渲染层图层数据格式

1.热力图

过滤器最后返回数据格式
@params config 可选参数 热力图配置 以下为默认配置
@params data 接口返回坐标集
return {
  config: {
     radius: 0.001,
      maxOpacity: 0.8,
      scaleRadius: true,
      latField: "lat",
      lngField: "lng",
      valueField: "count",
      useLocalExtrema: true,
      gradient: {
        0.99: "rgb(255, 167, 7)",
        0.85: "#ffcd04",
        0.5: "#2dc01d",
        0: "#00b4ff",
      },
      max: 100
  },
  data: [
    {
      lat: '123',
      lng: '456',
      count: 100
    }
  ]
}