Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

marker draggable=true won't update it's latitude/longitude values after being dragged #64

Open
nylki opened this issue Jan 27, 2016 · 0 comments

Comments

@nylki
Copy link

nylki commented Jan 27, 2016

In the following example I expect the circle to update it's position once the marker is dragged.
Even when manually printing out latitude and longitude via on-drag the marker always shows only the initial values I set.
Do I miss something or is it a bug?

<leaflet-map fitToMarkers="true">
    <leaflet-marker on-drag="updateCircle" draggable="true" longitude="{{longitude}}" latitude="{{latitude}}"> </leaflet-marker>

    <leaflet-circle longitude="{{longitude}}" latitude="{{latitude}}"
                radius="{{mapRadius}}" color="#0a0" fillColor="#077">
    </leaflet-circle>
</leaflet-map>
// […]
updateCircle: function (e) {
    // this will always show only the initial location set, not the new one after dragging
    console.log(e.originalTarget.latitude, e.originalTarget.longitude);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant