0

I'm trying to write a popUp function but I can't seem to figure out how to bind anything to the markers on my map.

<leaflet id="owmMap" event-broadcast="events" center="center" markers="markers" layers="layers"></leaflet>

I've been trying this for a while but it comes back empty

 $scope.markers
Showcaselfloyd
  • 790
  • 7
  • 28

2 Answers2

0

If I got you right you want to bind the content of your $scope.markers variable to the markers attribut uf your element.

To bind a Variable from the scope to the HTML you need to use interpollation like this:

<leaflet markers={{markers}} />
virth
  • 66
  • 7
0

Okay, it appears that I was correct and you can access the markers like so $scope.markers. Why it was not working for me, appears to have been when I was was trying to access them on the page. Sorry and thanks to @virth for tying to help.

Showcaselfloyd
  • 790
  • 7
  • 28