fnicollet / Leaflet

:leaves: JavaScript library for mobile-friendly interactive maps
http://leafletjs.com
BSD 2-Clause "Simplified" License
48 stars 20 forks source link

Make Marker Rotate Optional #6

Closed devguy22 closed 8 years ago

devguy22 commented 8 years ago

I really appreciate the work you've done on this; I've incorporated it into my project and it works well. The only thing is that for my work, I would ideally like some of the markers to rotate WITH the map, and some of them to remain upright (as it is now). I added a markerRotate option to the L.Marker creation and am checking for that (as well as whether the map has the rotate property set to true) in the _setPos method when calling setPosition. Maybe there's an alternate preferred approach, but it works for me and gives me the flexibility I need. Would you be able to include this modification? If not, I'll just keep the change local to my project.

fnicollet commented 8 years ago

Hello and thanks for trying out this branch :)

Out of curiosity, what is the use-case of having the marker rotate with the map? (screenshot?) Also, I guess you didn't bind any popup to it? Or it would probably be off.

Thanks, Fabien

On 27 Sep 2016 01:20, "devguy22" notifications@github.com wrote:

I really appreciate the work you've done on this; I've incorporated it into my project and it works well. The only thing is that for my work, I would ideally like some of the markers to rotate WITH the map, and some of them to remain upright (as it is now). I added a markerRotate option to the L.Marker creation and am checking for that (as well as whether the map has the rotate property set to true) in the _setPos method when calling setPosition. Maybe there's an alternate preferred approach, but it works for me and gives me the flexibility I need. Would you be able to include this modification? If not, I'll just keep the change local to my project.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fnicollet/Leaflet/issues/6, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLtoXFpsAEDueUi6HfB6o8LlJcaDa4Pks5quFMhgaJpZM4KHGOu .

devguy22 commented 8 years ago

No pop-ups. Our use case is that we have an image (a video really) draped onto the map with proper extents by means of a marker. The placement of that video is crucial for us and in our case is just as useful upside-down as right-side up (or any angle in-between).

fnicollet commented 8 years ago

I see. Do you know how to make a pull request on Github?

On 27 Sep 2016 01:35, "devguy22" notifications@github.com wrote:

No pop-ups. Our use case is that we have an image (a video really) draped onto the map with proper extents by means of a marker. The placement of that video is crucial for us and in our case is just as useful upside-down as right-side up (or any angle in-between).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fnicollet/Leaflet/issues/6#issuecomment-249728108, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLtoS_6jvCU5E4K8OsH49m_W0YoYSY4ks5quFbIgaJpZM4KHGOu .

devguy22 commented 8 years ago

I'm unable to push my branch to github for this project (permission error). I suppose I need your permission first? Or do I have to make separate fork and submit a PR from that?

fnicollet commented 8 years ago

Yes, you cannot push directly as don't have write rights on my branch (I could give them to you but that would make you a maintainer of the project!).

Once you have your branch ready, you can do it from the Github website, it is much easier, see their docs: https://help.github.com/articles/creating-a-pull-request/

On Tue, Sep 27, 2016 at 2:08 AM, devguy22 notifications@github.com wrote:

I'm unable to push my branch to github for this project (permission error). I suppose I need your permission first? Or do I have to make separate fork and submit a PR from that?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fnicollet/Leaflet/issues/6#issuecomment-249732943, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLtoSop2avbz-bu_c6qOC8d8PE6h-Lbks5quF6MgaJpZM4KHGOu .

Fabien Nicollet Tel : +33 (0)6 60 54 72 20

devguy22 commented 8 years ago

Yes, I of course was not trying to push to your branch; merely a separate branch but still within your fork to submit a PR. I just ended up forking your repo, uploading my branch to that, and making a PR from that fork to yours (I suppose that's what we're supposed to do, but I'm new here :) ).

fnicollet commented 8 years ago

Thanks, I just merged it, all good ! By the way, if you are using this branch somewhere accessible publicly online, please leave the link to your app, just want to see what how it is used :)

Fabien