Questions tagged [table-of-contents]

Table of Contents, a tabbed list of data frames and layers (or tables) on a map that shows how the data is symbolized, the source of the data, and whether or not each layer is selectable.

Filter by
Sorted by
Tagged with
1 vote
1 answer
57 views

Collapsing legend in ToC via PyQGIS

I am creating QGIS simple plugin which adds and set styles. It works like a charm, however i want to collapse all legends(categories) from styles in given layer i tried layer....
user avatar
  • 53
0 votes
1 answer
47 views

Making ArcGIS Pro output layer alias default to output dataset name

When using ArcGIS Pro for geoprocessing operations which require a single input dataset, the output layer alias defaults to the alias of the input layer. Take the "project" tool for example. ...
user avatar
0 votes
0 answers
40 views

Deleting the old layer set automatically - after sorting layers of one specific group within the table of contents alphabetically

I'd like to reorder the layers within ONE specific group of the TOC alphabetically by layer name, but without reordering the top level layers or the layers of other groups. @GérmanCarillo helped me to ...
user avatar
  • 447
5 votes
1 answer
427 views

Sorting layers by name in one specific group of QGIS layer tree

I'd like to reorder the layers within ONE specific group of the TOC alphabetically by layer name, but without reordering the top level layers or the layers of other groups. I found the following ...
user avatar
  • 447
1 vote
1 answer
53 views

Turning off single category of categorized symbology in ArcMap

I am new to ArcGIS Desktop. I have one layer with different types of sewer: for rain water only, for waste water only and both mixed. Every type of sewer should have his own color: rain - blue, waste ...
user avatar
  • 11
5 votes
0 answers
42 views

QGIS 3 Dragging layer in table of content with keyboard

Sometimes it is hard to drag a layer with a mouse. Is there a way to drag a layer (сhange its position relative to other layers) in a QGIS 3 table of content using only the keyboard?
user avatar
  • 5,682
1 vote
0 answers
131 views

How to configure grouped layers in the LayerList widget with feature layers

This applies to the ArcGIS Server JavaScript API v4.x. This LayerList widget example code contains grouped layers, whereby the San Francisco parent checkbox also controls its child layers: The ...
user avatar
  • 20.5k
1 vote
0 answers
45 views

Change group legend behaviour in QGIS 3

In QGIS 2, when you click on a group which contains subgroups, all subgroups are checked/unchecked at the same time. In QGIS 3, when you click on the same group, only that group is checked. Its ...
user avatar
  • 493
0 votes
1 answer
30 views

How can I add a custom-named output to TOC which is a managed data in ModelBuilder

I'm trying to make a model using the ModelBuilder. Everything is working properly, except the fact that I want to add the outputs to TOC with the specific layer name. The problem is that in order to ...
user avatar
4 votes
1 answer
14k views

Hiding a layer in Layers panel, but showing in Map Canvas [duplicate]

When a layer is added to QGIS, it is ordinarily added to "Layers" panel and "Map Canvas". The same thing happens when a memory layer (loaded/created by QgsVectorLayer) is added using QgsProject....
user avatar
1 vote
0 answers
103 views

Removing/hiding items in TOC panel (pie chart symbology)

I work in ArcMap 10.4. I need to find a way to remove/hide some of the items displayed in the TOC after applying Pie chart symbology to features. The main idea is the items are somewhat duplicated but ...
user avatar
  • 173
0 votes
0 answers
683 views

Updating xy fields in attribute table automatically when moving points to new locations in ArcMap?

I work on ArcGIS Desktop 10.3.1 and try to move several points so they are corresponding simultaneously to the coordinates value in the attribute table immediately. I know this question repeats in ...
user avatar
  • 3,982
1 vote
0 answers
158 views

QGIS layers panel doesn't show symbology

In the layers panel, the symbology next to the layer name doesn't show. Reinstalling QGIS has not fixed the problem. These are PostGIS point layers that draw on the map perfectly fine. The symbology ...
user avatar
3 votes
1 answer
1k views

QGIS 3 move layer to group

In the layer tree, I want to move a few layers at root level to a group also at root level. From what I have gathered so far, I have to clone the layer first, add it to the group and then delete the ...
user avatar
  • 401
1 vote
0 answers
46 views

Keeping TOC layers unchecked on first load in ArcGIS JavaScript API

I am new to ArcGIS and it's API. I am using NLiu's TOC widget for displaying the layers. It is working perfectly, however, I wanted to keep all layers unchecked when it is loading on the browser (for ...
user avatar
1 vote
0 answers
52 views

Scrolling TOC programmatically using ArcObjects in ArcMap AddIn?

I've created the small add-in command for ArcMap, that allows find in TOC and select the layer by it's alias or feature class name. Useful when map document contains several hundreds of layers. The ...
user avatar
  • 11
2 votes
1 answer
85 views

Getting layer label from ArcMap Table Of Contents?

How do I get a layer´s label from the TOC? I can´t find a similar question and ArcGIS Help tells nothing about it. I have searched even in other knowledge bases but with no success. I need to get ...
user avatar
  • 431
6 votes
3 answers
2k views

Sort layers in table of contents in QGIS 3?

When I load a bunch of layers into QGIS, they seem to load in reverse alphabetical order. I'd like to sort them alphabetically. In this thread a solution is proposed, but that does not work in QGIS 2....
user avatar
  • 161
-1 votes
1 answer
39 views

Dock ArcGIS 9.3 table of contents

How do I dock the table of contents within the ArcGIS window.
user avatar
2 votes
0 answers
35 views

Copying Table of Contents from QGIS into Excel?

Is there a way to copy and paste the contents of the Table of Contents in QGIS into an Excel spreadsheet? For example, I have many layers (groups of vector shapefiles which are underneath various '...
user avatar
1 vote
2 answers
127 views

Move files from Table Of Contents to a geodatabase in ArcPy?

I have a program that selects certain files and imports them to the Table Of Contents in ArcMap. I would like to do some self intersect operations to all and put them both the original files and the ...
user avatar
0 votes
1 answer
241 views

Preventing Append_management from adding target to Table of Contents? [duplicate]

I am using ArcGIS Desktop 10.2. I have a script that successfully converts a .csv into an already-existing feature class by first truncating the feature class table and then using the following line ...
user avatar
  • 1,187
6 votes
1 answer
718 views

Change background color of Layer in the TOC / QgsLayerTreeLayer with pyqgis

I would like to change the background-color (or font color) of some items in the TOC of QGIS: Example-Mockup: I tried several ways but nothing did the trick so far: layer_list = QgsProject.instance(...
user avatar
0 votes
1 answer
239 views

Removing layer from TOC when it has space in name using ArcPy?

I am trying to remove layers from the TOC using Python Toolbox. It works provided that the layer names have no spaces in their names. Tho whole script looks like: class ...
user avatar
  • 431
1 vote
3 answers
877 views

Concatenating two columns in ArcGIS 10.2.1: "no records within table"?

I am trying to merge two text columns (consisting of 2 digit and 3 digit numbers respectively) into one in ArcGIS 10.2.1 desktop version, but unable to do so. I have added a new field and kept it as ...
user avatar
  • 11
1 vote
0 answers
458 views

Selecting the active layer in Layers tree in QGIS [closed]

How do I programmatically (in QGIS with Python) set the position of the active layer and show it in the legend tree. Specifically if the layer is in a collapsed group or is it far below the list?
user avatar
  • 48
1 vote
1 answer
1k views

How to duplicate a map layer at most once as the bottom layer in qgis3 (python)

I wanted to duplicate a layer in qgis3 using python (display the same vector data as different layers) per this question (How can I duplicate a layer in QGIS?). In addition, I need to: make sure that ...
user avatar
  • 10.3k
1 vote
0 answers
62 views

Getting signal when toggling group in PyQGIS? [duplicate]

I have a group which contains x number of layers. I can connect the group's node visibilityChanged signal to a simple print function so that when the group is toggled, a message is printed to the ...
user avatar
  • 72.4k
3 votes
2 answers
2k views

Set layer order in QGIS with PyQGIS

There are several similar questions around, like Sort layers in QGIS table of contents or Order layer in QGIS with PyQgis, but I can't get it to work. Here is what I do: # image and shapefile are ...
user avatar
  • 1,154
3 votes
1 answer
105 views

Connect symbol layer from Layers Panel to function

If I create a simple function: def print_me(): print 'Clicked!' and I switch off the symbology for Elephant as shown below: I would like the function to run. What would be ideal is if we can ...
user avatar
  • 72.4k
15 votes
1 answer
1k views

How to apply changes in QSettings immediately?

With PyQGIS, you can change various settings such as making the groups in the Layers Panel (or table of contents) bold: from PyQt4.QtCore import QSettings QSettings().setValue("/Qgis/legendGroupsBold"...
user avatar
  • 72.4k
0 votes
1 answer
872 views

How to create TOC icons from a geojson leaflet style

I have a leaflet map that shows a couple of geojson layers. The style for each layer is represented in a TOC by means of the plugin Grouped Layer Control. The TOC has the following aspect: The ...
user avatar
4 votes
1 answer
2k views

Setting different context menu actions for each layer type with PyQGIS

I want to set different actions(context menu) for vectors,rasters,etc . class MyMenuProvider(QgsLayerTreeViewMenuProvider): def __init__(self, view): QgsLayerTreeViewMenuProvider.__init__(self) ...
user avatar
  • 347
7 votes
1 answer
1k views

How to change visibility of a particular layer category in PyQGIS?

I've got one layer with its symbol MARKER, categorized by an expression in 4 colors. The colors depends on a value of a column. So from the TOC, I'm able to click and enable/disable, as they were ...
user avatar
1 vote
1 answer
39 views

Add layer subsets in table of content

As I have too much data in one shapefile (it is too long to load), I created from this shapefile 4 layers showing the level of environmental risk. However I would like these shapefiles to be subsetted ...
user avatar
0 votes
0 answers
360 views

Clear/refresh table of contents in Geoprocessing tools

I'm building a Python toolbox and when I run one of my tools, I noticed that the table of contents doesn't update itself in the drop down list of my Python tool. As you can see in the image below, ...
user avatar
  • 71
5 votes
1 answer
158 views

Can QGIS for Windows use ticks instead of crosses in the Table of Contents?

In a fairly old blog, Martin Dobias shared a post detailing the use of the QGIS Layer Tree API where one of the images shows the Table of Contents (or Layers Panel in QGIS jargon) using ticks to show ...
user avatar
  • 72.4k
2 votes
1 answer
2k views

How to prevent zoom-in when clicking in the Leaflet table of contents window?

The Leaflet grouped layer control plugin has a demo page, where double-clicking within the Table of Contents window has no effect on the map. This sample uses Leaflet 0.73. When using this plugin ...
user avatar
  • 20.5k
3 votes
1 answer
823 views

Make this the only selectable layer (greyed out)

Someone else has tried Creating shortcut (button) for "Make this the only selectable layer" in Python 2.6? but, as pointed out there, the answer doesn't work. When adding "Make this the ...
user avatar
  • 53
12 votes
2 answers
769 views

Setting width of layers panel in QGIS?

When I open QGIS, the Layers Panel defaults to a width that doesn't show the "Remove Layer/Group" button. So I have to resize the panel to show the button every time I open QGIS. Is it possible to ...
user avatar
  • 123
3 votes
1 answer
2k views

Altering UI colour within ArcMap

I was wondering if anyone knows if it's possible to change the colours of the user interface within ArcMap? Specifically the background and text colours of the table of contents and the ArcCatalog/...
user avatar
  • 31
4 votes
1 answer
209 views

Show full layer name (including extension) in QGIS table of contents

Is there an option in QGIS to show the full name of a layer (including the extension) in the TOC? I'll take a python solution as well, but it would need to trigger on layers being added.
user avatar
  • 3,649
2 votes
1 answer
599 views

How to only check one layer in a group at a time?

I have a group of layers and in my plugin, I would only like one layer from a specific group to be checked at any time. The plugin contains a toggle button which connects each layer to a function. The ...
user avatar
  • 72.4k
6 votes
1 answer
295 views

Turning off representation descriptions in ArcMap table of contents?

Using ArcMap 10.3.1, advanced, how do I turn off the display of the layer representation descriptions in the TOC? I've highlighted what I'm trying to turn off in the screenshot below. Nothing in the ...
user avatar
  • 7,069
3 votes
0 answers
32 views

Python Add In Change tab in Table of Contents [duplicate]

I'm working on an add in that generates new structures for an addressing system. The tool is working well, but as it runs, at some point it changes tabs in the Table of Contents to the "List By Source"...
user avatar
  • 69
4 votes
3 answers
680 views

Renaming layer in a TOC using a tool within Python Toolbox

I created a simple tool that renames layers in the TOC using a for loop. As a tool within my normal toolbox it works fine. Now I´m trying to work more and more with the Python Toolbox and want to ...
user avatar
  • 431
16 votes
1 answer
3k views

Making layer or group private/hidden/invisible in Layers Panel of QGIS

I have a number of layers in the Layers Panel inside a group but I don't want them shown (there's quite a lot so it looks untidy). These layers are also joined to several others. Is it possible to ...
user avatar
  • 72.4k
10 votes
4 answers
7k views

How to move layers in the Layer Order Panel using PyQGIS?

Related to the following question but looking for a PyQGIS method: QGIS Layer Order Panel - add layers at top of layer order The following is a simple setup containing a group with three layers. ...
user avatar
  • 72.4k
1 vote
0 answers
270 views

TOC ArcGIS JS API app Is empty

I've been trying to use Nliu's TOC . I've followed a few examples and looked through the threads here, but I'm totally stumped on why my code isn't working. This is my code <!DOCTYPE html> <...
user avatar
6 votes
1 answer
161 views

Turning on another layer when one is selected in TOC using PyQGIS?

I have a large number of raster model files of water depths with corresponding velocity vectors in point shapefiles. I want to be able to 'walk through' the results displaying the depths and velocity ...
user avatar
  • 3,649