AnsweredAssumed Answered

Getting “isWebMercator” Error When Trying To Draw a Circle On Graphics Layer

Question asked by behClevest on Oct 24, 2017
Latest reply on Oct 25, 2017 by rscheitlin

can you please take a look at this snippet and let me know why I am getting this Error message

Uncaught TypeError: Cannot read property 'isWebMercator' of undefined

from the Circle.js module?

 

var graphicsLayerPoint = new esri.layers.GraphicsLayer();   
map.addLayer(graphicsLayerPoint);

var graphicsLayerCircle = new esri.layers.GraphicsLayer();  
map.addLayer(graphicsLayerCircle);


$("#btnAddJunctionFlag").on("click", function () {
        toolbar = new Draw(map);
        toolbar.activate(Draw.POINT);
        map.hideZoomSlider();
        toolbar.on("draw-end", addToMap);

        function addToMap(evt) {
        circle = new Circle({
            center: evt.mapPoint,
            geodesic: true,
            radius: .6,
            radiusUnit: "esriMiles"
        });
    }
    var cgraphic = new Graphic(circle, circleSymb);
    graphicsLayerCircle.add(cgraphic);

    var pgraphic = new Graphic(evt.geometry, config.symbolPointJFlag);
    graphicsLayerPoint.add(pgraphic);
}

Outcomes