I have three base layers in a layer group
var baseLayers = {"Straßenkarte": osmLayer, "Luftbild": bingLayer, "Luftbild mit Straßennamen": bingLabelLayer};
makes my control. After
L.control.layers(baseLayers).addTo(map)
the last layer metioned there is shown on top. I can draw another layer on top with zIndex or for example
bingLayer.bringToFront()
But in this case, the layer marked in the control does not change. How can I alter this (sorry, leaflet-dummy)?
Welcome to SO!
What you have probably missed is that the visibility of your basemaps should be modified by directly adding them to / removing them from the map, instead of fiddling with their z-index / DOM position with bringToFront.
Then the Leaflet Layers Control automatically syncs its selection when you programmatically add / remove Layers it knows.
Related
I enabled gridlines like below.
tree.EnableGridLines = TreeViewGridLines.Both;
But the problem is the lines are barely visible like below (if you think there are no gridlines, zoom the image, and look really hard). Gtk.TreeView had GridLineWidth, but it was read-only. How can I make them more visible?
I have tried to find C# equivalent of the answer's C code and the following worked. Making the gridlines thicker worked but the problem was that in Ubuntu, the colour of the gridline is too light that it was not really visible even it it were thicker. So, I changed the colour instead.
var p = new CssProvider();
p.LoadFromData("*{border-color:darkgray;}");
tree.StyleContext.AddProvider(p,Gtk.StyleProviderPriority.Application);
You could use a CSS provider and set the grid line width to a larger value than one pixel. Again, the following code snippets are written in "C"; however, it should be easy enough to interpret the code to use equivalent C# statements.
First, off one would create a GTK CSS provider.
GtkCssProvider *provider;
provider = gtk_css_provider_new();
Then, the customized CSS style information would be defined for the CSS provider widget and the CSS provider widget would be associated with your tree view.
gtk_css_provider_load_from_data(provider, "*{-GtkTreeView-grid-line-width: 4;}", -1, NULL);
gtk_style_context_add_provider(gtk_widget_get_style_context(view), GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
Note that GTK defines a specific set of attributes for grid elements as opposed to using a standard element such as "border-width". The attribute needing customization in this scenario is "-GtkTreeView-grid-line-width".
Having set the grid width to an exaggerated width of four pixels, the following sample illustrates the effect of the custom CSS style enhancement.
I hope that points you in the correct direction.
Regards.
I'm trying to create custom markers, but add 2 map layers.
Essentially trying to combine this:
https://www.mapbox.com/mapbox-gl-js/example/custom-marker-icons/
With this:
https://www.mapbox.com/mapbox-gl-js/example/toggle-layers/
How do I specify my customized markers, but assign them to 2 layers?
Markers don't exist within the map's Style, so they don't live within Layers either. They sit on top of the map, effectively within a single "layer" (but not actually a Layer).
So if you're trying to find a way to hide or show groups of markers in a single action, you'll have to find another way to do that.
Alternatively, if you really want your markers within Layers, you should create Symbol Layers with icons, not markers.
I have PSD file with about thousand layers. And I have one selected shape area. And 0 layers are selected. Now my question is how to select only those layers that are in selected shapes. Layer is in selected shapes if part or all layer is in selected shape. Selected shape is non rectangle.
I think it is possible with the ctrl - click. You can hold ctrl and then select layers you want to have selected.
If you are wanting a way to do this by shape area ,either a path or a selection, automatically that is not possible. (There might be a script or plug-in but not one I can think of off-hand.
A possible workaround:
If you select the move tool and check "Auto Select" and "Layer" in the options bar you can click an area of an image and Photoshop will automatically select a layer that contains the content you clicked.
If you hold down the shift key you can select multiple layers (shift-clicking a layer you already selected deselects that layer.) If there is a layer behind another layer it will always select/deselect the front-most layer. To get around this right-click the area that contains both layers, a list of layers in order will appear and you can select the layer you want by name. (see image)
Using this method you should be able to capture all of the layers within a certain area by hand in a fairly efficient manner.
After you have all the layers you want selected you can either group them (which is the best method but doesn't work if you need to maintain their current layer order in relationship to all of the other layers in the document) or you can link them which will allow you to select or move them together in the future.
Not sure if this solves your problem, hope it helps.
Good luck.
Holding Shift key & select your multiple objects
For Single selection:
Click Control(ctrl) button and select your layers.
For multiple selection:
Use Shift and then click your layers.
How can I deal with overlapping lines in the Leaflet map library?
I download geoJSON from the server sid and draw it right onto the map. If there are two identical entries, Leaflet draws them twice. This could be fixed by finding exact duplicated on the server side.
That however doesn't work for different datasets sharing some of the same space. As a result parts of both are drawn onto the same spot.
It appears that the lines are being rendered with the default Leaflet Polyline opacity of 0.5. If you were instantiating the Polylines yourself in code, you could override the opacity to make the lines opaque in this manner:
var myPolyLine = new L.Polyline( myPoints, { opacity: 1 } );
The line that would appear on top would then be the line that you added to the map last (one or the other is going to be on top, unless you make them both opaque and the same color). But this may be moot if you are loading in geoJSON directly and don't have control over how Leaflet renders it.
I have multiple layers in a visio document.
One overview layer and some "detailed" layers.
What I would like to do is double click a shape in the overview layer (layer 1) and toggle the detail layer (layer 2) (so when clicking the shape in layer 1, layer 1 should become invisible and layer 2 should become visible).
Is there an easy way to accomplish this in visio 2010?
I have searched around the internet and the only thing I found was to add the following formula to the shape's shapesheet "EventDblClick", but I get the errormessage "Error in Formula":
=SETF(GetRef(ThePage!Layers[1].Visible),NOT(ThePage!Layers.Visible))
Thanks in advance.
For setting property of layer put ID after property
=SETF(GetRef(ThePage!Layers.Visible[1]),NOT(ThePage!Layers.Visible))