Skip to content
This repository has been archived by the owner on May 26, 2019. It is now read-only.

How could I add points into Polyline I made before? #16

Open
wingskyo1 opened this issue Dec 13, 2018 · 0 comments
Open

How could I add points into Polyline I made before? #16

wingskyo1 opened this issue Dec 13, 2018 · 0 comments

Comments

@wingskyo1
Copy link

wingskyo1 commented Dec 13, 2018

How could I add points into Polyline I made before by ID?
Is it possible?
I want to make a trace line of user's location, is addPolyline a good way?
or any better ways?

args.map.setOnMapClickListener(function(point) {
        args.map.addPolyline({
          id: 1,
          points: [
            {
              lat: point.lat+0.01,
              lng: point.lng+0.01
            },
            {
              lat: point.lat,
              lng: point.lng
            },
            {
              lat: point.lat+0.02,
              lng: point.lng+0.02
            },
          ]
        });
        return console.log("Map tapped: " + JSON.stringify(point));
      });
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant