udbk

Graphichs in child window

Discussion created by udbk on Feb 2, 2013
Latest reply on Feb 4, 2013 by udbk
Hi All,
Iam adding some graphics on map in parent window, I would like to show the same graphics

in child window Iam using ArcGIS Javascript API 3.1 version. I have written as below

In parent Window:
var m_glayer = new esri.layers.GraphicsLayer();
function ShowPoint() {
    dojo.connect(map, 'onClick', function () {
        var x = -110.893677;
        var y = 44.058510;
        for (var i = 0; i < 10; i++) {
            addPoint(x, y);
            x = x + 0.001;
            y = y + 0.001;
        }
    });
}

function addPoint(x, y) {
    var point = new esri.geometry.Point(x, y, map.spatialReference);
    var simpleMarkerSymbol = new esri.symbol.SimpleMarkerSymbol();
    var graphic = new esri.Graphic(point, simpleMarkerSymbol);
    m_glayer.add(graphic);
    map.addLayer(m_glayer);
}

Iam calling it in init function
dojo.connect(layer, "onLoad", ShowPoint);

In Child window:

Iam calling it in init function
map.addLayer(m_glayer);

But Iam not able to see graphics in child window.

Thanks,
Uday

Outcomes