How to use the gcoord.transform function in gcoord

To help you get started, we’ve selected a few gcoord examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lishewen / ngx-spa-wechat4work / src / app / bus-map / bus-map.component.ts View on Github external
this.busmap.pointUpdated.subscribe((bus: server.车辆实时坐标信息) => {
      let bms = this.busmarkers.filter(v => v.onBoardid == bus.onBoardid);
      if (bms == null || bms.length <= 0)
        this.busmarkers.push({
          onBoardid: bus.onBoardid,
          marker: gcoord.transform([bus.经度, bus.纬度], gcoord.WGS84, gcoord.AMap),
          label: {
            offset: {
              x: 0,
              y: -30
            },
            content: bus.onBoardid.toString()
          }
        });
      else
        bms[0].marker = gcoord.transform([bus.经度, bus.纬度], gcoord.WGS84, gcoord.AMap);
    });
  }

gcoord

geographic coordinate library

MIT
Latest version published 9 months ago

Package Health Score

64 / 100
Full package analysis