leaflet.boatmarker
leaflet.boatmarker copied to clipboard
Overlapping icons
WOW, I love this.
Except.... I want to use this to track yacht races, where multiple boats are near each other. It seems that the image is a large png with a little boat in the middle. Unfortunately, this means that they often overlap, so that an attempt to click on any will only trigger the top boat.
Any thoughts?
Hi, the boat is actually not a PNG but a HTML5 Canvas, that I draw the boat on. I am sure that you can resize the canvas and the drawn paths to your needs. Start here: https://github.com/thomasbrueggemann/leaflet.boatmarker/blob/master/leaflet.boatmarker.js#L36
Hi Thomas!
Thanks for your reply. That's exactly what I did. I resized the canvas to my desired size and fiddled with the paramaters and path to fit the boat almost exactly inside it!
On Tue, Nov 14, 2017 at 1:15 AM, Thomas Brüggemann <[email protected]
wrote:
Hi, the boat is actually not a PNG but a HTML5 Canvas, that I draw the boat on. I am sure that you can resize the canvas and the drawn paths to your needs. Start here: https://github.com/thomasbrueggemann/leaflet. boatmarker/blob/master/leaflet.boatmarker.js#L36
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thomasbrueggemann/leaflet.boatmarker/issues/7#issuecomment-344193024, or mute the thread https://github.com/notifications/unsubscribe-auth/Af9OqCV-od9pZOywRFk_HmaK5o0n_Xonks5s2VoVgaJpZM4Qcjhb .
Awesome! You could make a "scaling" parameter available for every user to configure and open up a pull-request, if you'd like!
I've never done a pull request....I'll look into it!
Maybe we add a "rotate the canvas" to the deal. It seemed when I used your heading command, it would rotate the boat WITHIN the canvas
On Tue, Nov 14, 2017 at 7:22 AM, Thomas Brüggemann <[email protected]
wrote:
Awesome! You could make a "scaling" parameter available for every user to configure and open up a pull-request, if you'd like!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thomasbrueggemann/leaflet.boatmarker/issues/7#issuecomment-344292494, or mute the thread https://github.com/notifications/unsubscribe-auth/Af9OqEZYElLrlznrXEt0DHpJaEpyQsXDks5s2bAcgaJpZM4Qcjhb .
Any chance you could post the code you used to do this? I'm running into the same issue.
Thank you for sharing the code.