Comments (2)
I did try this, but it failed to clear markers after changing activity
displayPolyline: function(polyline) {
if (this.track) {
this.track.remove();
this.track = null;
}
if (polyline !== null && polyline !== '') {
const decoded = L.PolylineUtil.decode(polyline);
this.track = L.polyline(decoded, {color: 'red'}).addTo(this.map);
var latlngs = this.track.getLatLngs();
var start = latlngs[0];
var end = latlngs[latlngs.length - 1];
L.marker([start.lat, start.lng]).addTo(this.map);
L.marker([end.lat, end.lng]).addTo(this.map);
this.map.fitBounds(this.track.getBounds());
}
},
from activities.
You probably need to store the markers (this.start = L.marker(...); this.end = ...
) and remove them at the beginning of displayPolyline
(this.start.remove(); ...
) just like what's done with this.track
.
I can implement this tonight.
from activities.
Related Issues (20)
- Always refetch the latest activity
- auth error HOT 4
- Display elevation profile
- Full multi-user website HOT 2
- Display statistics about the filtered activities HOT 1
- Add JS liniting HOT 4
- Heatmap mode for filtered activities HOT 1
- Enhance Statistics Tab HOT 1
- Allow to display heatmap without selecting an activity HOT 1
- Since few commits, the maps is no longer zoomable via double click or moving with mouse drag HOT 2
- Display filtered activities in a table
- Display activities such as github activity graph HOT 6
- Can we add pace or heartrate for activites? HOT 3
- How to extend the DB schema? HOT 3
- If an activity is deleted in Strava, also delete it from the local DB
- Add an option to delete from the local DB and resync all activities HOT 1
- Display POI HOT 1
- Add tabular view
- ERROR: Failed building wheel for pycairo HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from activities.