AnsweredAssumed Answered

how remove new Graphic() a map?

Question asked by CloudingSoft on Apr 17, 2016
Latest reply on Apr 23, 2016 by rscheitlin

hello, this is how I add a dynamic new Graphic() to my map, by clicking a button.


idButtonDojo = 1;

var newButton = 'ButtonNodeAddMark_'+idButtonDojo;

// <data> It is a variable data

$( "#"+newButton ).on( "click", {

   y : <data>,

   x : <data>,

  nombre : <data>,

  direccion : <data>,

  telefono : <data>,

   color : <data>


}, addDinamicMark );

function addDinamicMark(event) {

   var mapPnt = new Point(,, new SpatialReference({wkid:4326}));




function setMark(pnt,nombre,direccion,telefono,color,_width,_height) {

   var Symbol = new PictureMarkerSymbol(""+color+"Pin1LargeB.png",_width,_height);

   var Template = new InfoTemplate("${Nombre}","<i><font color='grey'>Dirección:</font></i> ${Direccion}<br />\n\
  <i><font color='grey'>Telefono:</font></i> ${Contacto}<br />");

   var mark = new Graphic(




   "Nombre": nombre,

   "Direccion": "<br/>"+direccion,

   "Contacto": "<br/>"+telefono



   map.infoWindow.resize(270, 350);



Now I want to remove this same NEW GRAPHIC() the map with another button, how I can do?