Hey Guys new to ESRI and the javascript graphics. I have the following function that when you click on the map adds a circle graphic to the map at that locations geographic lat and Long. But what im tyring to accomplish is that when you click on the map it adds the circle and when you click on the map again it updates the circle's locations. Any help would be great.
function update_circle(first, second) { //add circle to map for current locaiotn var gl = new GraphicsLayer(); var p = new Point(first, second); var s = new SimpleMarkerSymbol().setSize(60); var g = new Graphic(p, s); map.removeLayer(gl); gl.add(g); map.addLayer(gl); }
أكثر...
function update_circle(first, second) { //add circle to map for current locaiotn var gl = new GraphicsLayer(); var p = new Point(first, second); var s = new SimpleMarkerSymbol().setSize(60); var g = new Graphic(p, s); map.removeLayer(gl); gl.add(g); map.addLayer(gl); }
أكثر...