1

How can I simply just remove this polyline from the map?

            var pointA =  L.latLng(From.lat, From.lng);
                var pointB =  L.latLng(To.lat, To.lng);

                var pointList = [pointA, pointB];

                var st_line = L.polyline(pointList, {
                    color: 'red',
                    weight: 3,
                    opacity: 0.5,
                    smoothFactor: 1
             }).addTo(mymap);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.