Open apaleja opened 10 years ago
You're right the one example that would give you an idea of how to do this is overly dense with no explanation. I should address this (#6)
However, to answer your question you should simply be able to add a event-listeners
attribute to the layer directive. Though I haven't tried it yet. I'm certain that a globally available function would work, I'm not sure about a function within a controller, like is possible with the map directive.
myLyrFunction(evt){
var lyr = evt.object;
lyr.style = ({ default: { color: '#0088ff' } });
lyr.redraw();
}
<az-layer lyr-type="geojson"
lyr-url="examples/data/airports.json" projection="EPSG:4326"
event-listeners="{loadend: myLyrFunction}">
</az-layer>
Nope!
There are 2 problems.
event-listeners
attribute is applied to the wrong place. However, this should work for tile and wms layers.
Hi Matt,
I am glad to find AzimuthJS for openlayers integration. I am new to AngularJS, So I am facing some difficulty in implementation. I would like to add listeners to vector layer but I am not able to find any example for same.
how can I achieve it?
Thanks Anand