Closed drissrais closed 7 years ago
Hi, can you try to invert the order? Like
<openlayers custom-layers="true" ol-view="vm.view" ol-center="vm.center" ol-controls="vm.controls" width="100%" height="480px">
<ol-layer name="{{ layer.name }}" ol-layer-properties="layer" ng-repeat="layer in vm.layers|filter: { active: true}"></ol-layer>
<ol-layer ol-layer-properties="vm.geoserver"></ol-layer>
<ol-control name="{{ control.name }}" ng-repeat="control in vm.controls|filter: {active: true}"></ol-control>
</openlayers>
If I recall correctly, the bottom-most layer in the directive configuration is the highest layer (from z-index perspective) in the map. Let me know if that solves your issue
Yes, that's it. Thank you.
2017-03-08 10:11 GMT+00:00 Juri Strumpflohner notifications@github.com:
Hi, can you try to invert the order? Like
If I recall correctly, the bottom-most layer in the directive configuration is the highest layer (from z-index perspective) in the map. Let me know if that solves your issue
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tombatossals/angular-openlayers-directive/issues/357#issuecomment-285000849, or mute the thread https://github.com/notifications/unsubscribe-auth/AY7WiWs_ntXlW_HRCFHyMQExA_AHz-wCks5rjn62gaJpZM4MVYeX .
Another thing plz. When i change the base layer, the selected base layer hide my vector layers again. How to make them visible even when i change the base layer?
Another thing plz. When i change the base layer, the selected base layer hide my vector layers again. How to make them visible even when i change the base layer?
2017-03-08 10:39 GMT+00:00 Juri Strumpflohner notifications@github.com:
Closed #357 https://github.com/tombatossals/angular-openlayers-directive/issues/357.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tombatossals/angular-openlayers-directive/issues/357#event-991132740, or mute the thread https://github.com/notifications/unsubscribe-auth/AY7WicJ2AMijJ3deiy9Uda7rj9avK_Boks5rjoV4gaJpZM4MVYeX .
Hmm..not sure. That shouldn't happen, unless the order of layers gets messed up again when you hide/show the base layers.
What I usually do is to pass in the entire set of layers as a single array.
<openlayers custom-layers="true" ol-view="vm.view" ol-center="vm.center" ol-controls="vm.controls" width="100%" height="480px">
<ol-layer name="{{ layer.name }}" ol-layer-properties="layer" ng-repeat="layer in vm.layers|filter: { active: true}"></ol-layer> <ol-control name="{{ control.name }}" ng-repeat="control in vm.controls|filter: {active: true}"></ol-control>
</openlayers>
vm.layers
basically contains all, the base layers as well as other layers. And I make sure to keep them ordered properly, such that the base layers stay below others.
I see what you mean, but in case i pass the entire set of layers as a single array, how should i modify my function of changing ONLY base layers, not my vector layers? here is my function: vm.changeLayer = function(layer) { vm.layers.map(function(l) { l.active = (l === layer); }); vm.selectedLayer = layer.name; }; Thanks.
2017-03-08 12:20 GMT+00:00 Juri Strumpflohner notifications@github.com:
Hmm..not sure. That shouldn't happen, unless the order of layers gets messed up again when you hide/show the base layers.
What I usually do is to pass in the entire set of layers as a single array.
vm.layers basically contains all, the base layers as well as other layers. And I make sure to keep them ordered properly, such that the base layers stay below others.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tombatossals/angular-openlayers-directive/issues/357#issuecomment-285026653, or mute the thread https://github.com/notifications/unsubscribe-auth/AY7WiTiFhCFm1kCBEz2YMEMUfuBBTt5aks5rjpzwgaJpZM4MVYeX .
Because as you could have seen in my map.html, i've made a list of 4 radio buttons concerning base layers to allow user select between them.
How can i do if i pass the entire set of layers in a single array?
2017-03-08 14:02 GMT+00:00 Driss Rais drissrais@gmail.com:
I see what you mean, but in case i pass the entire set of layers as a single array, how should i modify my function of changing ONLY base layers, not my vector layers? here is my function: vm.changeLayer = function(layer) { vm.layers.map(function(l) { l.active = (l === layer); }); vm.selectedLayer = layer.name; }; Thanks.
2017-03-08 12:20 GMT+00:00 Juri Strumpflohner notifications@github.com:
Hmm..not sure. That shouldn't happen, unless the order of layers gets messed up again when you hide/show the base layers.
What I usually do is to pass in the entire set of layers as a single array.
vm.layers basically contains all, the base layers as well as other layers. And I make sure to keep them ordered properly, such that the base layers stay below others.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tombatossals/angular-openlayers-directive/issues/357#issuecomment-285026653, or mute the thread https://github.com/notifications/unsubscribe-auth/AY7WiTiFhCFm1kCBEz2YMEMUfuBBTt5aks5rjpzwgaJpZM4MVYeX .
Hi there! First thank you for your considerable efforts. I'm facing a problem since a while, working with angular openlayers directive and geoserver. In my map.controller.js i have added four layers as base maps in a variable i've named layers, with a function to allow changing between them, like shown below:
My file map.html is like below: (with a list of 4 radio buttons and using angular-openlayers-directive)
All is working well, and i can select and see any of my base maps. The problem is when i added my shapefiles stored in a Postgresql/PostGIS database that i've connected with geoserver and published them, i see my shapefiles behind the base layers. In my map.controller.js i have added a variable i named geoserver in which i call my shapefile from geoserver with wms like i've seen in an example, like below:
then i added in my map.html the balise corresponding to my geoserver variable like shown below:
After that, i visualized just the base layers like before and didn't see my geoserver layer that i added, i thought first that the adding of the layer from geoserver failed, but when i change from a base layer to another one, in that moment just before the selected base layer appears, i see first my geoserver layer before it is hidden behind the selected base layer, i knew that it is successfully added but is just hidden behind the base layers, so it's just visibility problem. How can i make it over the base layers? is it related with an order that i have to respect or should i add something? Thanks and sorry for being long.