Logicify / jquery-locationpicker-plugin

JQuery Location Picker plugin
MIT License
389 stars 260 forks source link

Updating draggable property #150

Open piyushD2 opened 4 years ago

piyushD2 commented 4 years ago

I want to allow map and marker draggable property true or false based on some dynamic conditions. But right now, with first initialization of locationpicker on an element, if I set draggable property as false, it doesn't change ever after that, even when I try to reinitialise locationpicker on that element. Can you please help me with this?

piyushD2 commented 4 years ago

I found a way to fix my problem. Since locationpicker was being applied on a simple div, I would delete that el from dom using jquery, and then create an el with same class and attributes at same location before performing reinitialisation on locationpicker on it.

I hope this idea helps someone. But still, it will be good to have a solution from the team here.

novalu commented 4 years ago

Same issue here but didn't found better solution, so I'm removing div and completely reinitializing location picker just like you. Thanks.