GithubHelp home page GithubHelp logo

How to hook marker on dragend event. about map HOT 5 CLOSED

ng2-ui avatar ng2-ui commented on August 15, 2024
How to hook marker on dragend event.

from map.

Comments (5)

allenhwkim avatar allenhwkim commented on August 15, 2024

Thanks for using it. This should work.
(markerDrag_end)="myFunc()"

Interesting! (markerDrag) works but (marderDrag_end) does not. I need to investigate more.

from map.

allenhwkim avatar allenhwkim commented on August 15, 2024

it wasn't "drag_end", but "dragend". Fixed it and released it with 0.2.1. Please test

from map.

kharatps02 avatar kharatps02 commented on August 15, 2024

Thanks for reply ,
It is not working, dragend event is not calling .

<ng2-map [center]="mapCenter" zoom="4">
<marker [position]="mapCenter" [draggable]="true" (dragend)="clicked($event)">

Error console ,

TypeError: Cannot read property 'open' of undefined
at Ng2MapComponent.openInfoWindow (http://localhost:4200/vendor/ng2-map/dist/components/ng2-map.component.js:103:29)
at HomeComponent.clicked (http://localhost:4200/app/home/home.component.js:35:33)

from map.

allenhwkim avatar allenhwkim commented on August 15, 2024

At least, It works with this plunker. I have updated plunker
http://plnkr.co/edit/9AI9dg?p=preview.

I think you want to call openInfoWindow when dragend. I have also tested with openInfoWindow which worked fine. The event name is markerDragend and usage is markerDragEnd(myFund($event))

from map.

kharatps02 avatar kharatps02 commented on August 15, 2024

Thanks its working for me .

from map.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.