This code have some error
kindly help: it do not plot outline with the fill symbol
function zmarkerSymbol(){
var houtline={"style":Enums.SimpleLineSymbolStyleSolid, "color":"red","width":1.0};
return ArcGISRuntimeEnvironment.createObject("SimpleFillSymbol",{"style":Enums.SimpleFillSymbolStyleSolid, "color":Qt.rgba(2, 2, 0, 0.4),"SimpleLineSymbol":{simpleLineSymbol:houtline}});
}
Solved! Go to Solution.
I think the whole command should look something like this:
const houtline = ArcGISRuntimeEnvironment.createObject("SimpleLineSymbol", {style:Enums.SimpleLineSymbolStyleSolid, color:"red",width:1.0});
const sym = ArcGISRuntimeEnvironment.createObject("SimpleFillSymbol", {style:Enums.SimpleFillSymbolStyleSolid, color:Qt.rgba(2, 2, 0, 0.4), outline:houtline});
Hi rajni sharma
I think the problem is that you have quotes around the properties you are using in the create function (e.g. styls, color, width). Take a look at the example in the API ref here
Does this work:
return ArcGISRuntimeEnvironment.createObject("SimpleFillSymbol",{style:Enums.SimpleFillSymbolStyleSolid, color:Qt.rgba(2, 2, 0, 0.4),"SimpleLineSymbol":{simpleLineSymbol:houtline}});
I also think you would need to call ArcGISRuntimeEnvironment.createObject for the "houtline" symbol you are creating.
No it does not work, it just show filled symbol but it doesnot show outline. I tried this also, it shows only fillsymbol with no outline
var houtline = ArcGISRuntimeEnvironment.createObject("SimpleLineSymbol",{"style":Enums.SimpleLineSymbolStyleSolid, "color":"#FF0000","width":2.0});
return ArcGISRuntimeEnvironment.createObject("SimpleFillSymbol",{style:Enums.SimpleFillSymbolStyleSolid, color:Qt.rgba(2, 2, 0, 0.4),simpleLineSymbol:houtline});
}
I think the whole command should look something like this:
const houtline = ArcGISRuntimeEnvironment.createObject("SimpleLineSymbol", {style:Enums.SimpleLineSymbolStyleSolid, color:"red",width:1.0});
const sym = ArcGISRuntimeEnvironment.createObject("SimpleFillSymbol", {style:Enums.SimpleFillSymbolStyleSolid, color:Qt.rgba(2, 2, 0, 0.4), outline:houtline});
thanks luke, well if simply created it does not use outline. where was the problem actually
// *** create simple boundary symbol ***//
SimpleFillSymbol {
id: fillSymbol
style: Enums.SimpleFillSymbolStyleSolid
color: Qt.rgba(1, 1, 0, 0.0)
SimpleLineSymbol {
style: Enums.SimpleLineSymbolStyleSolid
color:"#ff7919"
width: 2.0
}
}