Questions tagged [angular-leaflet-directive]

AngularJS directive used to embed and interact with maps managed by the Leaflet library.

This directive allows you to embed a map on your AngularJS application and interact bi-directionally with it via the AngularJS scope and the leaflet map library API.

Useful Links
GitHub

253 questions
1
vote
0 answers

Can't bind component in leaflet setContent function

I use a leaflet in my angular project and I need to open a custom modal on the map's pin click. I find some code that works but I need to put my custom component instead of HTML code as you see below: .setContent(`test…
heliya rb
  • 682
  • 8
  • 26
1
vote
1 answer

How to move the marker icon from one latitude,longitude to another (fetched from the API) using leaflet open street map in angular

I my angular application I have used the Leaflet open street map for creation of map.And I have fetched the latitude and longitude array from the API.That is { "Drone": { "Droneid": 1001, "latlong": [ { "lat": 12.989839, …
1
vote
1 answer

How to use tilt in ngx-leaflet?

I have a site in Angular10 where I'm showing a map using ngx-leaflet. But I cannot make the tilt works.. I need to show the map as a "navigation" view, I mean show the map to the front and not like from the sky as a GPS. So for that I need to set…
Faabass
  • 1,394
  • 8
  • 29
  • 58
1
vote
1 answer

How to disable drawing any polygon on Leaflet map

I am trying to disable drawing any polygon on map until user selects any radio option displayed in image below. So How can I cancel drawing or disable user to draw anything on map?
1
vote
3 answers

Change color of leaflet map

I want to change color of the map in leafletjs but I just can't figure out which class it is. I found .leaflet-container { background-color:rgba(255,0,0,0.0); } however it only changes the color outside the map (you see it when map is…
user122222
  • 2,179
  • 4
  • 35
  • 78
1
vote
1 answer

Typescript Leaflet marker Custom property

I want to add a custom property to every marker, when I try the solution below I get this error: Property 'myCustomID' does not exist on type '(latlng: LatLngExpressio n, options?: MarkerOptions) => Marker'. let customMarker =…
1
vote
1 answer

leafletDirectiveMarker disable focus when user click outside the map

I have a click function on the marker which will enable the marker popup. But when the user clicks outside the map I want to disable this focus. How to do this? $scope.$on('leafletDirectiveMarker.click', function (event, args) { …
rajmohan
  • 1,618
  • 1
  • 15
  • 36
1
vote
0 answers

Event contextmenu is not trigger on Safari with Leaflet and Leaflet.GridLayer.GoogleMutant

Right click don't work on Safari (desktop) with googleMutant layer for Leaflet. On the jsfiddle bellow, contextmenu event is trigger on Open street map but not on google map. However it work fine on other…
1
vote
1 answer

Leaflet map keeps moving infinitely when using maxbounds

I created a crs leaflet map and I'm trying to set its maxbounds to the bounds of the crs image. When I add the maxbounds attr there are three leaflet events that keep firing infinitely which cause the map to move infinitely. These are the…
1
vote
0 answers

Leaflet using inline svg as the base layer

Currently, I serve a map with an imageOverlay base layer. Right now, I need to use an svg instead of the current png imageOverlay, and to alter the svg css (like, changing opacity for the nearest places (paths in the svg) etc), dynamically, so…
1
vote
0 answers

Leaflet.markercluster: slow performance when zooming

I am rendering a million geojson data which is the type of Polygon. This gives better performance when render the data. But when zooming the map, gives very slow performance. How to avoid this issue? I am using the events zoomstart and zoomend to…
Jeeva J
  • 3,173
  • 10
  • 38
  • 85
1
vote
0 answers

Leaflet Marker with button inside

I'm adding a bunch of markers on my map the following way: L.marker({ lat: this.latitude, lng: this.longitude }, { icon: myIcon }) .bindPopup("

" + this.name + "

" + this.desc + "

1
vote
2 answers

move a marker for every 5 seconds in a map angular leaflet

I want to move a marker on map for every 5 seconds , right now my code is working in debug mode i mean, i am able to see the moving of marker in debug mode , whenever i switch from debug mode marker is reaching directly to last lat long point that…
Vishnu
  • 455
  • 2
  • 7
  • 25
1
vote
2 answers

Stop click propagation on a custom div within a leaflet map

I have a custom div (with settings) within a map. I would like click event not to propagate to map when a user clicks on the div. How could one achieve such behavior? Leaflet version 1.0.
makar
  • 155
  • 3
  • 14
1
vote
0 answers

Leaflet Directive - Click event working only once

Code : $scope.$on('leafletDirectiveMap.click', function(event, locationEvent){ $scope.newLocation = new Location(); $scope.newLocation.lat = locationEvent.leafletEvent.latlng.lat; $scope.newLocation.lng =…
Divyam Solanki
  • 461
  • 2
  • 7
  • 25