Hot answers tagged

16

Here you find the map including the legend. The legend is in German, but I am German, so I tried to translate it as precise as possible. I think (and please @Giancarlo correct me, if you disagree): 1 is "Reichsstra├če, ausgebaut". That means a well-developed street. 2 is propably a sort of drainage system or stream (thank you @AndreJ). It is not named in ...


15

Here is a really simple example library(raster) data(volcano) volcanoR <- raster(volcano) #making colors below 100 red and above 180 blue in this example breakpoints <- c(94,100,120,140,160,180,195) colors <- c("red","white","white","white","white","blue") plot(volcanoR,breaks=breakpoints,col=colors) You just need to pass the plot a vector of ...


15

You could listen for the "overlayadd" and/or the "overlayremove" events on the map object and have two separate legends (two controls) defined, e.g.: map.on('overlayadd', function (eventLayer) { // Switch to the Population legend... if (eventLayer.name === 'Population') { this.removeControl(populationChangeLegend); ...


14

In 10.1 you have a lot more control over legends. You should be able to wrap both the labels and the description using the Text Wrapping option in the Layout tab (see below) If that still doesn't work you can manually force the line breaks using the Symbology tab in the Layer Properties. If you right click each of your unique values and select Edit ...


12

To start with I will drop this website as a resource you should tie into. your sequences are actually backward. your fourth has to be the first thing you attempt. (something I learned long ago is to plan what you want to end up with and then work back to where you are so you are sure you will end up with what you want [not something else]). 1. you need ...


11

It's a great question. One standard set of iconic markers with which everyone in the world is familiar is their country's set of street signs: stop, yield, crossing ahead, etc. I hope the point of such standardization is immediately obvious. Note that the actual meanings of many of the highway symbols are not intrinsic: they must be learned (especially ...


11

In layout view, open the legend properties and browse to the Items tab (see above picture) where you can specify which items show the count. If you were asking specifically about showing the count in the Table of Contents, I'm not sure how this can be done. I looked around but only found this helpfile from ArcMAP that states For example, you can use ...


11

Decrease the height of the the legend box to zero: In the example below you can see that I got a line legend even if my data is polygon. Right-click on your legend, click on properties Go to the Legend tab and change the height into either 1 or 0. That will reduce all polygon layer patches in the legend to lines. You can also set this property per-layer, ...


10

I guess the idea is that you don't have to make anything up and if your "boss" askes why something looks the way it does, you can just point him to "the standard".


9

I had the same problem last year : a few dozen of maps to produce within three days, same legend, but different locations. I used this setup : vector data in PostGIS raster data in GeoTiff (shaded relief) cartographic engine : MapServer, with PDF vector output batch processing : PHP to automate MapServer, with MapScript PHP finalization with Adobe ...


9

The workaround I usually use for any situation in which I want to customize the legend entry for a layer is to create a dummy layer which is only used in the legend, and not displayed on the map. So in your case, create a new line layer using a line shapefile with no features in it, symbolize it however you want, and add that to your legend. The new layer ...


8

The method we use is to have a duplicate copy of the layer just for the legend. After the map layer looks the way you want, just drag the layer from the TOC and on to the map to make a duplicate. We append '_map' to the name of the map layer version to differentiate between the two layers. Then the symbology size or width can be adjusted for each icon or ...


7

On the third screen of the legend wizard you have the option to assign the gap that you want between the frame and the object in the legend (this also applied to neatlines). Adjust that until it looks right. I too also convert features to graphics, but this is the very last thing I do on a map; it is no longer tied to the map features and if you change ...


7

Another option is to add a rectangle shape to the composition, then style the rectangle using a gradient fill with the same color ramp as your raster. This can be done directly in QGIS, no image editing or html required.


7

Rather than try to use the ArcMap application alone, I have brought ArcPy into the picture. I just tested and achieved what you described using the UniqueValuesSymbology (arcpy.mapping) class which has a writable classDescriptions property which can be set to: A list of strings or numbers that represent the descriptions for each unique value that can ...


7

To complement Luigi's answer, this is how you can use the Layer Tree View for adding a legend and/or a ToC to your application. After you create your canvas in your standalone PyQGIS application, you need to create a QgsLayerTreeView. For that, you need a model, and for the model you need the layer tree root. Additionally, you need to use a ...


6

not sure if the users are IOS or Android but maybe the list/interface icon it would go nicely with what the user is used to seeing in other apps, unless of course its already being used for something else.


6

You can use CSS border-radius to create circles. For example, put this in your stylesheet/style tag: .legend .circle { border-radius: 50%; width: 10px; height: 10px; margin-top: 8px; } Then add the circle class to the color block when you create the marker: div.innerHTML += '<i class="circle" style="background:' + ...


6

Yes it is, but there's a bit of work to it. The article in the previous answer related to text description fields which can be edited and entered manually for each symbol class: These are automatically italic and their font can be changed without affecting the layer name or symbol classes. If you want to italicize only one word in a symbol class you can ...


6

Assuming that you mean the visibility of the layer in the Table Of Contents, once you get a reference to the layer, it has a visible attribute: import arcpy inMXD = "xyz.mxd" lyrName = "layername" mxd = arcpy.mapping.MapDocument(inMXD) df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] #the first data frame lyr = arcpy.mapping.ListLayers(mxd, lyrName, ...


6

German surveyors did everything according to rules. For the 1:100.000 Karte des deutschen Reiches, you can find it here: http://www.landkartenarchiv.de/deutschland_topographischekarte_1896_legende.php and http://www.davidrumsey.com/luna/servlet/detail/RUMSEY~8~1~215008~5501917:Legend-for-Karte-des-Deutschen-Reic #1 are major roads, no need for trees. ...


5

... such as a body outline for a homicide scene... Summarizing: Standard Symbology is used for fast map reading. I think that's the point of standard symbology, when you look at it you know what it means. The legend is indispensable indeed. But when you look at a standard symbol like a "body outline" the very deep of your subconscious tell you what ...


5

A Map Legend is a static representation of features on the map and their meaning A Table of Contents [TOC] is an interactive list displaying features on the map - some even showing what is visible in real-time.


5

If you have access to ArcMap, examine the arcpy mapping module


5

With the AddLayer method you cannot be more precise than "TOP" or "BOTTOM" as shown above. However, if you use the InsertLayer method (ESRI Help Pages), you can specify a reference layer (or multiple reference layers) and add your new layer in reference to that. import arcpy mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd") df = ...


5

In ArcMap 9 and 10 you can go to Insert > Legend in layout view, and follow the GUI to create & format the legend.


5

Assuming that you wish to do this in a QGIS Print Composer layout, and not the main interface's layer legend (which is currently not possible), here is a layout representation of what you may be looking for: Note that this legend is comprised of multiple items (not just a basic legend item): background rectangle, title label and two legend items (in ...


5

If you are trying to get more space between columns: column gap. If the item is not already split into 2 columns, you can do this in the Items tab.


5

I would suggest using the Table of Contents/Legend Widget for JavaScript API. It has all the functionality you describe and is a very well written, free, widget. I use it in my apps and it is very easy to configure.


5

I'd say it should look something like this: https://www.iconfinder.com/icons/64438/legend_icon#size=32



Only top voted, non community-wiki answers of a minimum length are eligible