Openlayers: How to keep a layer zIndex as set - z-index

I am using OpenLayers 2.13.1.
I have a vector layer and some WMS layers in a map. WMS layers can be added and removed but the vector layer always remains in map.
The vector layer is interactive therefore I want to keep that always on top of the WMS layer. I keep the zIndex of the vector over 1000 and keep zIndex of all WMS layers bellow 1000.
The problem occurs when I remove a WMS layer from the map: the vector layer goes bellow. I have noticed that method map.resetLayersZIndex() is invoked when I remove a layer which sets the zIndex according to the order in the layers array of the map.
Is there a way to keep the zIndex same as I set?

You have to move your important layer to the end of the map's layers-array after each addition of a layer:
map = ...
vectorLayer = ...
map.events.register('addlayer', map, function() {
this.setLayerIndex(vectorLayer, this.layers.length);
});

Related

Can I create a color image with a GAN consisting of only FC layers?

I understand that in order to create a color image, three channel information of input data must be maintained inside the network. However, data must be flattened to pass through the linear layer. If so, can GAN consisting of only FC layer generate only black and white images?
Your fully connected network can generate whatever you want. Even three channel outputs. However, the question is: does it make sense to do so? Flattened your input will inherently lose all kinds of spatial and feature consistency that is naturally available when represented as an RGB map.
Remember that an RGB image can be thought of as 3-element features describing each spatial location of a 2D image. In other words, each of the three channels gives additional information about a given pixel, considering these channels as separate entities is a loss of information.

MRTK eye tracking layer mask

I want to prevent the eye tracking ray from seeing some objects, how can I do that?
This object must contain a collider and must be interactable. So I can't delete the collider component.
I think I can solve the problem by editing the layermask property of the pointer that belongs to eye tracking, but I couldn't find how to do it.
You can create a new layer named "Ignore Raycast" and assign the layer to the GameObjects which block the ray. And then, make sure the Ignore Raycast layer has been unchecked in the array of LayerMask under the Pointing Raycast Layer Masks property in the Pointer profile.
For more information about Unity Layer please see: Layer

Clear all Layers with vkCmdBeginRenderPass (Vulkan, Layered rendering)

I have a framebuffer with one color attachment, which is a cube map with 6 layers. I try to use layered rendering with the geometry shader. Rendering of a simple triangle to all layers works. But I am not sure how to clear all layers with vkCmdBeginRenderPass.
vkCmdBeginRenderPass supports pClearValues and clearValueCount but I can not specify the number of layers. So only the first layer is cleared. Setting clearValueCount to 6 and giving 6 clear values also does not help.
I saw that vkCmdClearAttachments seems to allow to specify the layers.
Is vkCmdClearAttachments the only way, or did I miss something? Is there maybe a reason that vkCmdBeginRenderPass only clears the first layer although rendering seems to render to all layers?
clearValueCount refers to the number of attachments to clear (with regards to their clearOp), not the layers of a framebuffer.
The number of layers to be cleared at the start of a renderpass (if clearOp is set to clear) for a framebuffer is specified via the layerCount of it's imageView's subresource.

Is it possible to use different padding for each dimension in conv nets wit keras

I would like to use different paddings for different dimensions. In my case I'm using a 3dconvnet. The reason is that I would like to control how how the receptive field and axis squashing occurs for different dimensions. E.g. I would like to have padding equivalent to ("same","same","same") for a few layers and then perhaps ("same","valid","same") for some other layers.
My guess is to do
#maually calculate the paddings
ZeroPadding3D(...)
Conv3D(padding='valid',...)

Nutiteq set layer level or height

i have a map application. In my map, there is two layer which i use. First layer shows traffic lines, second layer shows my route. In this point when i draw route somewhere, my route lines remain below the traffic lines. So i want to set height or level my route layer. It have to allways top of traffic lines.
I try to set z point of my mappos but it couldn't. Is there another way to set height my layer?
MapPos mapPos = new MapPos(longitudeValue, latitudeValue, 1);
Drawing order is determined by adding order of Layers, so you should use different layers for traffic and route, and add traffic Layer before route Layer. Within single Layer the order of objects is not determined.
Z value is not in use in current version, this is meant for 3D cases, like display of pipelines below ground, or airways above ground. However, the public version does not render basic vector objects in 3D, only 3D models are supported.

Resources