Questions tagged [ngx-leaflet]

Leaflet components for Angular.io published to npm under @asymmetrik/ngx-leaflet

149 questions
2
votes
1 answer

How to find bounds of multiple markers added to leafletLayer

I am working with ngx-leaflet in an Angular 6 project, I draw multiple markers in my map and I want to center and zoom a leaflet map on multiple Markers In the official doc you can do it by using [L.latlngBounds] and find other solutions using…
Ghizlane Lotfi
  • 550
  • 1
  • 10
  • 21
2
votes
1 answer

How to add multiple set of marker?

I need to have multiple layer of icons drawed on my map. Each set of that icon must be rendered or not by clicking on the option panel. I found all examples that shown how to add a single marker or a group of markers, but nothing about a plurality…
Andrea Scarafoni
  • 937
  • 2
  • 13
  • 26
2
votes
1 answer

why ngx-leaflet in angular 2 does not render the map after changing state by *ngif

i have a problem with ngx-leaflet component from angular 2. after changing state of *ngif from true to false and again from false to true while map appeared, tiles render not occured. what to i do to avoid this problem? this is my html code
2
votes
1 answer

How to change coordinates runtime on ngx-leaflet?

There is any alternative to change ngx-leaflet map coordinates in runtime? This is possible with google maps and i'm trying do the same with leaflet. Changes to leafletOptions are ignored after they are initially set. This is because these options…
John
  • 1,697
  • 4
  • 27
  • 53
2
votes
1 answer

ngx-leaflet map zoom events not triggering

As per ngx-leaflet documentation link (leafletMapMoveEnd) and (leafletMapZoomEnd) are both exposed events. I'm assuming that these events are exposed in the same DOM that the map is Initialized, and should be implemented like this:
mrOak
  • 193
  • 3
  • 12
2
votes
1 answer

Use leaflet-arc in Angular?

How do I use the leaflet-arc plugin in Angular? What I've tried so far: npm install --save leaflet-arc Add "scripts": ["node_modules/leaflet-arc/src/leaflet-arc.js"] to angular.json. Add import…
tgordon18
  • 1,562
  • 1
  • 19
  • 31
2
votes
1 answer

How can you position zoom controls to bottom right?

I'm working with ngx-leaflet. By default the map shows the zoom controls on the top left. However I cannot find how the positioning of this can be changed. Here is an outdated method: options = { layers:…
Kode_12
  • 4,506
  • 11
  • 47
  • 97
2
votes
1 answer

Ngx-leaflet Leaflet, angular 5 lot of Function Call from zone.js

I am using ngx-leaflet, when adding markers to the map, the application slows down due to the large amount of Function Call (zone.js). I tried to use changeDetection and ngZone but to no avail. Please help :) constructor(zone: NgZone)…
Blackboy
  • 192
  • 2
  • 20
2
votes
1 answer

Leaflet MarkerCluster removeOutsideVisibleBounds not working

I have a Leaflet map that uses the Leaflet.markercluster plugin. The clusters plot properly on the map but I am noticing that the clusters that are outside the view are still rendering even though I have the removeOutsideVisibleBounds option set to…
jurgen w
  • 243
  • 1
  • 2
  • 14
2
votes
0 answers

Including external plugins

Is it possible to include extern plugins to my ngx-leaflet app? Because I would have to implement Leaflet.LayerGroup.Collision and Leaflet.Arc, but I don't know how to do it. Please let me know if you have an idea :) Thanks for any answer!
2
votes
5 answers

How to properly multicast result of HttpClient request to several components in Angular?

I'm trying to send the result of HttpClient post requests multiple components in my Angular app. I'm using a Subject and calling its next() method whenever a new post request is successfully executed. Each component subscribes to the service's…
Simeon Nedkov
  • 1,097
  • 7
  • 11
2
votes
1 answer

Add geoJson layer with angular with ngx-leaflet

I've set up my application using angular5 with ngx-leaflet (https://github.com/Asymmetrik/ngx-leaflet). I start with a blank map. When a user clicks a button, markers appear on the map. When a user selects a marker, that marker is identified to…
Keith James
  • 167
  • 1
  • 12
2
votes
2 answers

Leaflet maps not rendering properly in modal, even after calling map.invalidateSize()

I'm running into an issue that everyone else seems to run into where my ngx-leaflet map is not rendering fully until I resize. I have attempted to call map.invalidateSize() in many ways such as in ngOnInit, onMapReady, all of the above with a…
wvarner
  • 116
  • 2
  • 7
2
votes
1 answer

Leaflet marker click always shows last element

I am using Angular 5 and ngx leaflet including the marker cluster. Everything works fine but the click function always outputs the name of the last element of the list whereas the tooltip contains the correct name. for (var i of this.list) { …
Tonerl
  • 23
  • 6
2
votes
2 answers

How to center ngx-leaflet map inside ng-bootstrap modal

I want to display a ngx-leaflet map inside a ng-bootstrap modal, centered in a determinate point. The map is encapsulated in a component like this: HTML
1 2
3
9 10