arcgis-js-vscode-snippets
arcgis-js-vscode-snippets copied to clipboard
Add snippets for all Symbol classes
trafficstars
Today the extension contain just a few snippets
| Snippet | Description |
|---|---|
| simpleMarkerSymbol | Creates a SimpleMarkerSymbol in a MapView. Contains placeholder for style. |
| pictureMarkerSymbol | Creates a PictureMarkerSymbol in a MapView. |
| simpleLineSymbol | Creates a SimpleLineSymbol in a MapView. Contains placeholder for style, cap and join. |
| simpleFillSymbol | Creates a SimpleFillSymbol in a MapView. Contains placeholder for style. |
| pictureFillSymbol | Creates a PictureFillSymbol in a MapView. |
But this is just a small subset of all the Symbols.
It would be nice to have snippets for the following classes: (just the ones with the checkboxes; 21 in total)
- [ ] CIMSymbol
- [ ] WebStyleSymbol. I think adding the enums for WebStyleSymbol2D and the WebStyleSymbol3D is too much
- For 2D Symbols
- MarkerSymbol (Points)
- LineSymbol (Polylines)
- [ ] SimpleLineSymbol
- FillSymbol (Polygons)
- [ ] PictureFillSymbol
- [ ] SimpleFillSymbol
- [ ] Text Symbol (Labels)
- For 3D symbols:
- PointSymbol3D
- [ ] IconSymbol3DLayer
- [ ] ObjectSymbol3DLayer
- [ ] TextSymbol3DLayer
- LineSymbol3D
- [ ] LineSymbol3DLayer
- [ ] PathSymbol3DLayer
- PolygonSymbol3D
- [ ] ExtrudeSymbol3DLayer
- [ ] FillSymbol3DLayer
- [ ] IconSymbol3DLayer
- [ ] LineSymbol3DLayer
- [ ] ObjectSymbol3DLayer
- [ ] TextSymbol3DLayer
- [ ] WaterSymbol3DLayer
- MeshSymbol3D
- [ ] FillSymbol3DLayer
- PointSymbol3D
Instead of just the properties:
{
type: "simple-marker",
color: [255, 255, 255, 0.25],
size: 12,
style: "circle",
outline: {
width: 1,
color: [255, 255, 255, 1]
}
}
/* Snippet
"SimpleMarkerSymbol": {
"body": [
"{",
"\ttype: \"simple-marker\",",
"\tcolor: [255, 255, 255, 0.25],",
"\tsize: 12,",
"\tstyle: \"${1|circle,square,cross,x,diamond,triangle,path|}\",",
"\toutline: {",
"\t\twidth: 1,",
"\t\tcolor: [255, 255, 255, 1]",
"\t}",
"}"
],
"description": "Create a SimpleMarkerSymbol",
"prefix": "simpleMarkerSymbol"
}
*/
I would suggest something like:
new SimpleMarkerSymbol({
type: "simple-marker", // required only when autocasting
color: [255, 255, 255, 0.25],
size: 12,
style: "circle",
outline: {
width: 1,
color: [255, 255, 255, 1]
}
})
/* Snippet
"": {
"prefix": "",
"body": [
"new SimpleMarkerSymbol({",
"\ttype: \"simple-marker\", // required only when autocasting",
"\tcolor: [255, 255, 255, 0.25],",
"\tsize: 12,",
"\tstyle: \"${1|circle,square,cross,x,diamond,triangle,path|}\",",
"\toutline: {",
"\t\twidth: 1,",
"\t\tcolor: [255, 255, 255, 1]",
"\t}",
"})",
],
"description": ""
}
*/
Note: I think these are all symbols. Checking the symbol builder gallery I think I haven't left anything out... 😅
Does it make sense @kellyhutchins ? // cc: @RalucaNicola
Yes 100% it would be fantastic to have snippets for all of the symbol classes
@hhkaos can you please assign this to me ?
Sure, done! 👍 😄