infusion-code / angular-maps

Angular Maps (X-Map) is a set of components and services to provide map functionality in angular 2+ apps. X-Maps architecture is provider independent and can be used with Bing, Google, ESRI or any other service enabled mapping provider. X-Map contains a default implementation for Bing Maps.
MIT License
41 stars 34 forks source link

trigger MouseDown in x-map-polygon #119

Open frsab opened 5 years ago

frsab commented 5 years ago

can you please tell me how I can trigger the MouseDown (mousedown) event from the x-map-polygon component I tried to do that in the following way, but it did not work.

` <x-map #xmap
[Options]="_options" [Box]="_box" (MouseDown)="_eventMouseDown($event)"

    <x-map-polygon  *ngIf="showCircle()"
    (MouseDown)="_eventMouseDown($event)" 

    [Paths]="_path" 
    [Editable]="true" 

    ></x-map-polygon>
  </x-map> ` ***Component.html

_eventMouseDown(event){ console.log('_eventMouseDown(event)'); } ***Component.html

thor-schueler commented 5 years ago

@frsab: Your approach is ok. see working sample at https://stackblitz.com/edit/bing-map-with-complex-polygon-mousedown.