1
votes
circle = new Microsoft.Maps.Polygon([e.location, e.location, e.location]);
mouseMoveEventHandler = Microsoft.Maps.Events.addHandler(map, 'mousemove', function (e) {
            if (circle) {
                UpdateCircle(e);
            }
        }

I found this sample code on the internet and I don't understand what "if(circle)" means. Also, what is "e"? I'm trying to create this Polygon object without using an event handler and I don't know how to go about it and I was hoping that understanding what this code does would help. I don't know what to search on the internet, either. Thanks.

1

1 Answers

0
votes
if (circle)

is a conditional that means "if the variable 'circle' exists", then do an action... the action being a function:

UpdateCircle(e)

The variable circle is there so, more than likely the UpdateCircle function will execute.