Copy or clone an ESRI graphic

2365
1
03-29-2011 08:08 AM
PauPérez_Puigcerver
New Contributor II
How can I clone a graphic (it's geometry or the entire graphic) and change its symbol in order to highlight?

This code isn't work:
graficoPerfil = new esri.Graphic();
graficoPerfil.setGeometry = graphic.geometry;

graphic is the graphic for clone. graficoPerfil is the new copy of graphic.

Thanks.

Pau Pérez
http://cartoweb.cma.gva.es
0 Kudos
1 Reply
derekswingley1
Frequent Contributor
setGeometry() is a method so you would do the following:
graficoPerfil.setGeometry(graphic.geometry);
0 Kudos