How to use gcoord - 4 common examples

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
window.navigator.geolocation.getCurrentPosition(point => {
        this.centerPoint = gcoord.transform([point.coords.longitude, point.coords.latitude], gcoord.WGS84, gcoord.AMap);
      }, error => {
        this.msg.add(error.message);
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);
    });
  }
github lishewen / ngx-spa-wechat4work / src / app / bus-map / bus-map.component.ts View on Github external
constructor(private t: TitleService, private msg: MessageService, private busmap: BusMapService) {
    t.setTitle(this.title);
    this.subscribeToEvents();
    this.centerPoint = gcoord.transform(this.centerPoint, gcoord.WGS84, gcoord.AMap);
    this.busicon = {
      size: {
        width: 24,
        height: 12
      },
      imageSize: {
        width: 24,
        height: 12
      },
      image: "/assets/icons/bus_r.png"
    };
  }
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 8 months ago

Package Health Score

64 / 100
Full package analysis