Vector Graphics with Dojo GFX

2134
0
11-25-2015 12:15 AM
omega_cancer
Occasional Contributor II
var surface = gfx.createSurface("surfaceElement", 400, 400);

// Create a rectangle
surface.createRect({ x: 100, y: 50, width: 200, height: 100 })
    .setFill("yellow")
    .setStroke("blue");


// Add a circle
surface.createCircle({ cx: 100, cy: 300, r:50 })
    .setFill("green")
    .setStroke("pink");

I want to add the shape of surface onto map as graphic.

Any help would be appreciated.

0 Kudos
0 Replies