I am developing an extension for SSA and am wondering is there a way to have a vector layer legend collapsed by default?
Here is some sample code:
// Create payload for the vector layer on map with legend
const vectorLayerData = {
friendlyName: 'Custom Query',
source: vectorSource,
doNotCreateLegend: false,
style: {
fillColor: "#939BFF",
fillPattern: 16,
lineStrokeColor: "#939BFF",
lineStrokePattern: 1,
lineStrokeWidth: 2,
pointIcon: 1,
polyFillColor: "#939BFF",
polyStrokeColor: "#939BFF",
polyStrokePattern: 3,
polyStrokeWidth: 2
}
};
// Dispatch the action to create vector layer
this.store.dispatch(new AddVectorLayerAction(vectorLayerData));
Cheers,
Ben
------------------------------
Ben Kleywegt
INSIGHT GIS
------------------------------