How to integrate leafleat-rotate-map npm package ? #36
Replies: 2 comments 1 reply
-
|
Hi @killianweid, Thanks for reaching out and creating a discussion on this, because going forward this is something I want to improve. Integrating each new Leaflet plugin/JS library into Waymark has been a challenge even for me and after all these years I know the codebase quite well! 🤯 Part of my current effort is to try to make Waymark more modular, more modern and a better experience for developers. This is takes alot of time however!
Is your desire for there to be a button, which once pressed orientates that Map according to the device compass (if available?). If so I would definitely also like to see this included at some point. Thanks again for your input. Joe |
Beta Was this translation helpful? Give feedback.
-
|
Hi @killianweid, Apologies for my delay in getting back to you - I am away making Tracks at the moment :)
Feel free to fork Waymark and commit your changes. This will allow me to quickly see your edits and replicate on my end. While I am happy to take a quick look at this once I get some more free time, I have to be honest about my hesitation to "bake" any more plugins/libraries/features into the plugin. Things are already so "interwoven" (read as ... "spaghetti" ;) that I am actively trying to remove and simplify the core codebase. Instead I would eventually like to make Waymark more extensible by standardising/documenting/creating "hooks" that developers can use to add extra functionailty... like how WordPress does with plugins. This is long-term goal however and in the mean time I would be happy to look at what you have, but I can not guarantee I will be of much help... or that it will be merged into Waymark. Cheers, Joe |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, in order to rotate the map according to the direction of movement of the user (I developed a GPS on leaflet maps) I would like to integrate the npm package leafleat-rotate-map but I don't know how to go about it.
I have already tried to install it via the command "npm install leaflet-rotate-map" then include it in the waymark.js file via line 27 of the "Gruntfile.js" file as an attachment. But then when I try to use the "setBearing()" method in the "Waymark_Map.js" file (which is created in the previous package) it is not recognized..
Gruntfile.js.zip
Beta Was this translation helpful? Give feedback.
All reactions