tombatossals / angular-leaflet-directive

AngularJS directive to embed an interact with maps managed by Leaflet library
http://tombatossals.github.io/angular-leaflet-directive
MIT License
1.5k stars 635 forks source link

Layer Bounds #329

Closed JaumeFigueras closed 9 years ago

JaumeFigueras commented 10 years ago

Hi again, I've seen that a layer have a bounds param, but can I use it to get the bounds? For example in a layer with markers get the extent of them. Thanks.

tombatossals commented 10 years ago

Hi @JaumeFigueras, seems an interesting feature, being able to get the extent of an markers area inside a layer. But it's not implemented, as far as I know. Can you tell me where's the "bounds" param of a layer you're referring?

JaumeFigueras commented 10 years ago

Hi, sorry, sorry, sorry, i meant function, a getBounds function in leaflet, :( Sorry about the mistake. I was thinking to call the getBounds function to update a bounds property in the layer model each time the layers watch is executed (for layers inheriting LayerGroup and the property defined). I think it won't consume extra computing time, but is there a way to ask the directive to call a function and return the result without accessing the Leaflet object from outside the directive? Thanks.

tombatossals commented 9 years ago

Hi @JaumeFigueras, lot ot time passed from that issue, sorry for not responding.

You can't call a leaflet function without access the Leaflet object, you already know that for sure.

I'm closing this issue, please reopen if needed.