You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys, I have a MapView with a MarkerCollectionLayer as childLayers, and that MarkerCollectionLayer has a MarkerLayer that extends the DraggableMixin, so I'm trying to get the location of the MarkerLayer when it's dragged...
varmarkerLayer=EmberLeaflet.MarkerLayer.extend(EmberLeaflet.DraggableMixin,EmberLeaflet.PopupMixin,{dragend: function(){//The value of this.get('location') is always the same}});varmarker=EmberLeaflet.MarkerCollectionLayer.extend({itemLayerClass: markerLayer,events: ['click'],content: function(){varlat=this.get('controller.geolocator.latitude');varlon=this.get('controller.geolocator.longitude');return[{location: L.latLng(lat,lon)}];}.property('controller.geolocator.latitude','controller.geolocator.longitude')});exportdefaultEmberLeaflet.MapView.extend({zoom: 15,options: {maxZoom: 19,minZoom: 0},events: ['click'],childLayers: [EmberLeaflet.DefaultTileLayer,marker],center: function(){returnL.latLng(this.get('controller.geolocator.latitude'),this.get('controller.geolocator.longitude'));}.property('controller.geolocator.latitude','controller.geolocator.longitude')});
The problem is that in the dragend handler I'm getting always the same value :(.
What I'm doing wrong?
Thanks!!!
The text was updated successfully, but these errors were encountered:
Hi guys, I have a
MapView
with aMarkerCollectionLayer
aschildLayers
, and thatMarkerCollectionLayer
has aMarkerLayer
that extends theDraggableMixin
, so I'm trying to get the location of theMarkerLayer
when it's dragged...The problem is that in the dragend handler I'm getting always the same value :(.
What I'm doing wrong?
Thanks!!!
The text was updated successfully, but these errors were encountered: