I'm using OpenLayers 3 with AngularJS. I'm trying to make a factory such that I can generate an object for a tree control.
My function (which doesn't actually do anything yet), looks likes this:
getObjectFromMap: function(mapLayers) { console.log(mapLayers); mapLayers.forEach(function(element, index, array) { console.log(index); });}When I try to use the forEach method elsewhere in my application, it works fine. Within this method, the first console.log prints an ol.Collection as expected.
The forEach then does absolutely nothing.
Any ideas? Am I missing something obvious?
أكثر...
My function (which doesn't actually do anything yet), looks likes this:
getObjectFromMap: function(mapLayers) { console.log(mapLayers); mapLayers.forEach(function(element, index, array) { console.log(index); });}When I try to use the forEach method elsewhere in my application, it works fine. Within this method, the first console.log prints an ol.Collection as expected.
The forEach then does absolutely nothing.
Any ideas? Am I missing something obvious?
أكثر...