Closed goclixy-core closed 7 years ago
I think this was resolved by someone earlier but here it goes.
<leaflet
data-tap-disabled="true"
id="drawingMap"
lf-center="center"
defaults="defaults"
layers="layers"
ng-if="map"
width="100%">
</leaflet>
$scope.$on('leafletDirectiveMarker.drawingMap.click', function(event, locationEvent) {
alert('Message');
});
Hi, Have you solved this problem? I have encountered the same issue on iOS emulator, but not on web browser, could you please share the solution if possible?
Thank you.
Yes. The solution I gave above works for me on ios. I havent tested on ios emulator though.
In my case the leaflet id is "drawingMap" hence the binding string becomes 'leafletDirectiveMarker.drawingMap.click'
would you please tell me what version of code are you using? including leaflet and angular leaflet directive. Thank you.
Thank You, adding ID and data-tap-disabled="true" to the leaflet tag worked for me.
First of all, Thank you so much for this wonderful work!!!
I want to display the Map on a button click, but the click event does not work. Zoom In and Zoom Out (+ & -) buttons are also not working.
However, the drag and dblclick events are working fine.
If I display the map on controller's load without button click, everything works well.
Could you please help me with this issue?
The controller code is as follow:
.controller('ViewMap', function($scope) { $scope.map = false; $scope.viewMap = function() { $scope.map = true; angular.extend($scope, { mapCenter: { lat: 40.095, lng: -3.823, zoom: 6 }, defaults: { scrollWheelZoom: false }, markers: { ABC: { lat: 40.095, lng: -3.823, message: "This is Madrid. But you can drag me to another position", focus: true, draggable: true } }, layers: { baselayers: { osm: { name: 'OpenStreetMap', url: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', type: 'xyz' } } }, events: { map: { enable: ['zoomstart', 'contextmenu', 'drag', 'click', 'mousemove', 'popupopen'], logic: 'broadcast' } } });
}) VIEW FILE:
CONSOLE LOG: leafletDirectiveMap.mouseup leafletDirectiveMarker.mousedown leafletDirectiveMap.mouseup leafletDirectiveMarker.dblclick leafletDirectiveMarker.mousedown leafletDirectiveMap.mouseup leafletDirectiveMarker.mousedown leafletDirectiveMap.mousemove leafletDirectiveMarker.dragstart leafletDirectiveMarker.drag