AnsweredAssumed Answered

Create circle after loading of a div.

Question asked by Adityakumar529 on Dec 3, 2015
Latest reply on Dec 3, 2015 by Adityakumar529

Hi Users,

i am creating a circle on the map with the following lines of code.

 

   map.on("click", function (e) {

                  map.graphics.clear();

                  var circle = new Circle({

                      center: e.mapPoint,

 

 

                      radius: 1000,

                      radiusUnit: Units.MILES

                  });

                  var pictureMarkerSymbol = new PictureMarkerSymbol('Images/Bufferpin.png', 25, 25);

 

 

                  var point = new Point(e.mapPoint);

                  var pointGraphic = new Graphic(point, pictureMarkerSymbol);

                  map.graphics.add(pointGraphic);

                  // figure out which symbol to use   

                  map.graphics.add(new Graphic(circle, fillSymbol));

                  map.setExtent(graphicsUtils.graphicsExtent(map.graphics.graphics));

                  queryMapService(circle);

              });

 

But I need to perform the event after loading of a div where I will assign the units and radius length.

 

I have a button, on click of which a div opens where user can enter length and units and then on click on map the circle comes on the map.

 

 

Any suggestion in this will be helpful.

 

Thanks

Aditya Kumar

Outcomes