Esri / arcgis-js-vscode-snippets

Collection of Visual Studio Code snippets for common code patterns in the ArcGIS Maps SDK for JavaScript.
https://marketplace.visualstudio.com/items?itemName=Esri.arcgis-maps-sdk-js-snippets
Apache License 2.0
25 stars 8 forks source link

Snippet proposal: Load a MapView (2D) #15

Closed hhkaos closed 3 years ago

hhkaos commented 3 years ago

I would add a snippet to help instantiate a MapView Class in *.js files (this issue was opened with the help of the snippet building)


Prefix: MapView Description: Create an instance of esri/views/MapView Snippet:

const view = new MapView({
    container: "${1:viewDiv}",
    map: ${2:map},
    zoom: ${3:4},
    center: [${4:15,65}]
});

Code:

"Load a MapView (2D)": {
    "prefix": "MapView",
    "body": [
    "const view = new MapView({",
    "\tcontainer: \"${1:viewDiv}\",",
    "\tmap: ${2:map},",
    "\tzoom: ${3:4},",
    "\tcenter: [${4:15,65}]",
    "});",
    ],
    "description": "Create an instance of esri/views/MapView"
}
kellyhutchins commented 3 years ago

Looks good.

hhkaos commented 3 years ago

PR done!