GithubHelp home page GithubHelp logo

Comments (7)

jcfranco avatar jcfranco commented on July 19, 2024

Merge branch '#12_add-legend-items-to-toc' into develop 743d268

from arcgis-viewer-flex.

rscheitlin avatar rscheitlin commented on July 19, 2024

The MapSwitcherWidget.mxml need to pass the includeLegendItems var to the toc component. and the includeLegendsItems var needs to be Bindable.

from arcgis-viewer-flex.

rscheitlin avatar rscheitlin commented on July 19, 2024

Sarthak, I have ran into a situation where layerLegendInfo is null in the getLayerLegendInfo function and in the getLayerLegendInfos function when you check if layerLegendInfo.layerLegendInfos exists.

I use a RasterCatalog layer for testing as it does not produce a LayerLegendInfo;
Also if you use this layer it will have a (?) beside it (which to me is undesirable)

from arcgis-viewer-flex.

rscheitlin avatar rscheitlin commented on July 19, 2024

Sartak,
I have found if you add label = (legendItemInfo.label)?legendItemInfo.label:" "; when the TocLegendItem is created then you can avoid the DEFAULT_LABEL of the TocItem.

from arcgis-viewer-flex.

sarthakdatt avatar sarthakdatt commented on July 19, 2024

Robert,

Are you getting the same response on getLegendResult() for the layerLegendInfos(has one layerlegendInfo as expected):
(com.esri.ags.layers.supportClasses::LayerLegendInfo)#0
layerId = "Polygons"
layerLegendInfos = (null)
layerName = "Polygons"
layerType = (null)
legendItemInfos = (Array)#1
0#2
height = NaN
label = ""
symbol = (com.esri.ags.symbols::SimpleFillSymbol)#3
alpha = 1
color = 7556096
outline = (com.esri.ags.symbols::SimpleLineSymbol)#4
alpha = 1
color = 7237230
style = "solid"
width = 1.3333333333333333
style = "solid"
values = (null)
width = NaN
maxScale = 0
minScale = 0
visible = true

"I have found if you add label = (legendItemInfo.label)?legendItemInfo.label:" "; when the TocLegendItem is created then you can avoid the DEFAULT_LABEL of the TocItem."

Yes, i thought about that too, wasn't sure if we wanted to have a different default for legend items. Will try and come up with something.

from arcgis-viewer-flex.

rscheitlin avatar rscheitlin commented on July 19, 2024

Sarthak,
Yes for that layer I do get the same response. But for a layer like a raster catalog layer it just returns something like this: {"layers":[]}
Robert

from arcgis-viewer-flex.

sarthakdatt avatar sarthakdatt commented on July 19, 2024

Ok, will take care of that use case and update accordingly.

from arcgis-viewer-flex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.