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
1 answer

Angular leaflet directive zoom to marker on the center of the map

Dear fellow programmers, I try to create a map with leaflet directive. You can see the fiddle here. fiddle In the fiddle above, when i drag the map, the marker will always be in the center. But when i zoom in/out (using the scroll), the map is…
1
vote
1 answer

Leaflet marker icon click event is not working

I'm facing a problem with leaflet marker normally when i refresh the page the marker is clickable but when i come from another page marker is not clickable I try all the thing but did not find any solution. JAVASCRIPT: angular.extend($scope,…
1
vote
1 answer

AngularJS + Leaflet – Initialise a leaflet map on a service

I'm building an app in AngularJS that uses LeafletJS for interacting with a map, offering different possible interactions separated across what I call phases. For each of those phases there is a UIRouter state, with its controller and template. I'm…
flapas
  • 583
  • 1
  • 11
  • 25
1
vote
1 answer

Marker handle in angular-leaflet-directive

I need to get the handle of a marker in order to set the icon when I have a ng-mouseover somewhere else on the page. I push my markers into leaflet like this: angular.extend($scope, {markers: {'id1': {lat:foo, lng:bar}, …
1
vote
1 answer

Angular dynamically generated code on leaflet map

I have some application in angular. That is my html code.
kris14an
  • 741
  • 7
  • 24
1
vote
1 answer

Showing GeoJSON data on overlay

I'm trying to show/hide some GeoJSON data on an overlay layer. I've the data as an object, but not at some server. If I use the overlay type 'geoJSON', I'm getting a Eror: A base layer must have an url How do I show/hide my data using the overlay…
1
vote
1 answer

Marker not being removed : Leaflet

I am working with the leaflet api.Where i have added custom control for marker. And i have a button which tends to remove all markers. Problem Through wrapping, i have to remove all markers but function not working....Browser not giving any console…
S.Zirk
  • 139
  • 1
  • 2
  • 9
1
vote
1 answer

Angular Leaflet custom marker icon

I'm trying to override existing default marker icon with the custom one. I've defined parameters in a variable: var ratIcon = L.icon({ iconUrl: 'http://andywoodruff.com/maptime-leaflet/rat.png', iconSize: [60,50] }); and the icon is…
corry
  • 1,457
  • 7
  • 32
  • 63
1
vote
1 answer

How to add layers and update layer control dynamically : leaflet

I am working with the lealflet api, where user can draw shapes to map(image)... Initially the layer control(handling 1 layer) is added for base map using imageoverlay...... I have added a button of id 'newLyer' to page where click event handles the…
1
vote
1 answer

Angular Leaflet MarkerCluster from geojson

I want to show the leaflet MarkerCluster on the map, and the problem is at retrieving data from GeoJSON: { "type": "FeatureCollection", "features": [ { "type": "Feature", "id": "sto", …
corry
  • 1,457
  • 7
  • 32
  • 63
1
vote
1 answer

Imageoverlay state lost when using BringToFront() : leaflet

Introduction I am working with leaflet api, to create an application which uses two imageoverlays(added to map). Problem As i loaded two imageoverlays to map with fixed bounds. Now i am have put the controls to toggle the imageoverlays i.e next and…
1
vote
1 answer

Leaflet - Convert lat/lng to standard projection

How to convert coordinates from Leaflet coordinate system to coordinate system that Google uses (WGS-84?), if the data are in an external file (geojson)? In example with external geojson file, I've defined coordinates for Paris and Zagreb and I'm…
corry
  • 1,457
  • 7
  • 32
  • 63
1
vote
1 answer

Leafletjs override doubletap

How can I override a double tap onto a LeafletJS map? I do not want to zoom into the map, I want a custom procedure to start instead. It's a angular-leaflet-directive within ionic. Edit: I was pointed to the doubleClickZoom property (I must have…
El Dude
  • 5,328
  • 11
  • 54
  • 101
1
vote
1 answer

ng Leaflet Directive issue with ngRepeat + map.invalidateSize()

I have a page that generates a series of maps based off of an async call. When the maps first load, they are missing tiles, as seen in the below image. I can resolve this by calling map.invalidateSize() to redraw the tiles in each. Currently I…
1
vote
0 answers

angular-leaflet-directive doesn't update markers when calling a function

I'm very new to Angular and Leaflet. I followed the example of iH8 from this question: how make ng-model="search" have influence on leaflet directive? If this event is fired function receiveMessage(event){ $scope.geojson.data =…