Graphic Layer

512
1
03-15-2011 05:33 PM
AmorndechUdomdilokphop
New Contributor
I'm Add Layer Graphic Layer on the MAP, but the graphic on the layer move when i pan around. I want Graphic Layer move match coordinate. i editing form code not work. can u help me

For example:
you can't just have

var NewGraphics
NewGraphics = new esri.layers.GraphicsLayer({});
map.addLayer(NewGraphics);

Instead you have to have

NewGraphics = new esri.layers.GraphicsLayer({});
dojo.connect(map, "onLoad", function() {
map.addLayer(NewGraphics);
});
0 Kudos
1 Reply
HemingZhu
Occasional Contributor III
I'm Add Layer Graphic Layer on the MAP, but the graphic on the layer move when i pan around. I want Graphic Layer move match coordinate. i editing form code not work. can u help me

For example:
you can't just have

var NewGraphics
NewGraphics = new esri.layers.GraphicsLayer({});
map.addLayer(NewGraphics);

Instead you have to have

NewGraphics = new esri.layers.GraphicsLayer({});
dojo.connect(map, "onLoad", function() {
map.addLayer(NewGraphics);
});


set map's property displayGraphicsOnPan to false. so that graphic wouldn't display until the panning is over. It is less confusing and improve performance too.
0 Kudos