Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Fixed waypoint position #307

Open
keugens opened this issue Jul 1, 2024 · 4 comments
Open

Fixed waypoint position #307

keugens opened this issue Jul 1, 2024 · 4 comments

Comments

@keugens
Copy link

keugens commented Jul 1, 2024

I would appreciate any option to fix the position of waypoints.
The markers should not be dragable.

Is it possible to modify the code somewhere to have a quick solution?

Thanks and best regards
keugens

@vcoppe
Copy link
Contributor

vcoppe commented Jul 1, 2024

I am working on a new version of the website where the waypoints are only draggable when using the "Waypoints tool", see a preview here: https://gpx.studio/gpx.studio.

@keugens
Copy link
Author

keugens commented Jul 2, 2024

Thank you, looks promising!

It seems a small modification in leaflet.js works:

addHooks: function() { return;//ks
                var t = this._marker._icon;
                this._draggable...

It is possible to use a local copy of leaflet.js.
Since I have no deeper insight, this modification should be enjoyed with caution. :-)

@keugens
Copy link
Author

keugens commented Jul 28, 2024

Prefer this way: 😄

// f( s)  disable|enable  == waypoints locked|draggable
function set_waypoints( s){
  var traces= buttons.total.traces
  for (var i= 0;i < traces.length;i++){
    var waypoints= traces[i].getWaypoints()
    for (var j= 0; j < waypoints.length; j++){
      waypoints[j].dragging[s]()
    }
  }	
}

@vcoppe
Copy link
Contributor

vcoppe commented Jul 31, 2024

Please have a look at the future website https://gpx.studio/gpx.studio and its code https://github.com/gpxstudio/gpx.studio.

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

2 participants