Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add snippets for all Symbol classes #33

Open
21 tasks
hhkaos opened this issue Sep 26, 2023 · 1 comment
Open
21 tasks

Add snippets for all Symbol classes #33

hhkaos opened this issue Sep 26, 2023 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@hhkaos
Copy link
Member

hhkaos commented Sep 26, 2023

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)

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

@hhkaos hhkaos added the type/discussion Topic under discussion label Sep 26, 2023
@kellyhutchins
Copy link
Member

Yes 100% it would be fantastic to have snippets for all of the symbol classes

@hhkaos hhkaos added help wanted Extra attention is needed and removed type/discussion Topic under discussion labels Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants