SVG coordinates wrong

1591
0
07-10-2016 03:59 PM
BorisLutskovsky
New Contributor II

I've been trying to get SVG paths to work as simple marker symbols, but when they're placed on the map, the position is incorrect - both paths start at the same starting point, but when they're on the map they're off. Same issue in 3.17 and in 4.0

    var greenPath = "M 0 0 L 10 0 Q 11 2 8 3 Z";

    var redPath   = "M 0 0 L 10 5 Q 10 8 5 3 Z";

var sRed = new SimpleMarkerSymbol({

      color: "red",

      path: redPath,

      size: 50,

      outline: null,

      xoffset: 0,

      yoffset: 0

    });

    var sGreen = new SimpleMarkerSymbol({

      color: "green",

      path: greenPath,

      size: 50,

      outline: null,

      xoffset: 0,

      yoffset: 0

    });

var gred = new Graphic({

      geometry: point,

      symbol: sRed

    });

    var ggreen = new Graphic({

      geometry: point,

      symbol: sGreen

    });

view.graphics.add(gred);

    view.graphics.add(ggreen);

Tags (2)
0 Kudos
0 Replies