SketchViewModel.pointSymbol support for PictureMarkerSymbol

08-23-2019 09:59 AM
New Contributor

I have a feature layer that uses PictureMarkerSymbols as the map markers. When I move the feature I can only get the SketchViewModel.pointSymbol to be either SimpleMarkerSymbol or PointSymbol3D as described in the api documentation here:

Is there a technical limitation for not being able to use PictureMarkerSymbols? Is there any way I could extend arcgis js api's current functionality to allow this?

2 Replies
Esri Regular Contributor

Hi there, 

You cannot change the update graphic for SketchViewModel at this time. It is on our to do list. However, I do not have a timeline for this. 


0 Kudos
New Contributor

In case anyone else needs this functionality this hack somewhat works...

   const editingLayer = new GraphicsLayer();

    const map = new Map({
      basemap: new Basemap({
        baseLayers: [baseMapLayer]
      layers: [featureLayereditingLayer]

    const view = new MapView({
      container: this.$

    const sketchViewModel = new SketchViewModel({
      layer: editingLayer,
      updateOnGraphicClick: true

    sketchViewModel.on("update"async event => {
      if (event.state === "start") {
        await Promise.all(
 (graphic: esri.Graphic=> {
            const [PictureMarkerSymbol= (await loadModules([
            ])) as [esri.PictureMarkerSymbolConstructor];

            graphic.symbol = new PictureMarkerSymbol({
              url: require(`../assets/map_icons/${-1}_${
              height: 23,
              width: 23

    view.on("click"event => {
      if (sketchViewModel.state === "active") {
      view.hitTest(event).then(({ results }) => {
          .filter(x => x.graphic.layer === featureLayer)
          .forEach(async result => {
            await sketchViewModel.update(result.graphic, {
              tool: "move",
              toggleToolOnClick: false