addPolygon method

void addPolygon(
  1. _BasePolygon polygon
)

Adding a polygon to the map that can any of Polygon,MapRectanlge,MapCircle

Implementation

void addPolygon(_BasePolygon polygon){
  polygon._messagesSender=_sendData;
  polygon._messagesReceiver=_webMessages;
  polygon._startListenOnEvents();
  _polygons._addWithRandom(polygon);
  _sendData('addPolygon',polygon._toMap());

}