@@ -148,38 +148,72 @@ public GoogleMapMarker addMarker(
148148 return gmm ;
149149 }
150150
151+ /**
152+ * Creates a polygon with the given points and adds the new polygon to the map.
153+ *
154+ * @param points the points of the polygon
155+ *
156+ * @return the new created polygon
157+ */
151158 public GoogleMapPolygon addPolygon (List <GoogleMapPoint > points ) {
152159 GoogleMapPolygon polygon = new GoogleMapPolygon (points );
153160 addPolygon (polygon );
154161 return polygon ;
155162 }
156163
164+ /**
165+ * Adds a new polygon to the map.
166+ *
167+ * @param polygon the polygon to be added to the map
168+ */
157169 public void addPolygon (GoogleMapPolygon polygon ) {
158170 this .getElement ().appendChild (polygon .getElement ());
159171 if (this .getElement ().getParent () != null ) {
160172 this .getElement ().executeJs ("this._updateObjects()" );
161173 }
162174 }
163175
176+ /**
177+ * Removes a polygon from the map.
178+ *
179+ * @param polygon the polygon to be removed from the map
180+ */
164181 @ SuppressWarnings ("squid:S3242" )
165182 public void removePolygon (GoogleMapPolygon polygon ) {
166183 this .getElement ().removeChild (polygon .getElement ());
167184 this .getElement ().executeJs ("this._updateObjects()" );
168185 }
169186
187+ /**
188+ * Creates a polyline with the given points and adds the new polyline to the map.
189+ *
190+ * @param points the points of the polyline
191+ *
192+ * @return the new created polyline
193+ */
170194 public GoogleMapPolyline addPolyline (List <GoogleMapPoint > points ) {
171195 GoogleMapPolyline polyline = new GoogleMapPolyline (points );
172196 addPolyline (polyline );
173197 return polyline ;
174198 }
175199
200+ /**
201+ * Adds a new polyline to the map.
202+ *
203+ * @param polyline the polyline to be added to the map
204+ */
176205 public void addPolyline (GoogleMapPolyline polyline ) {
177206 this .getElement ().appendChild (polyline .getElement ());
178207 if (this .getElement ().getParent () != null ) {
179208 this .getElement ().executeJs ("this._updateObjects()" );
180209 }
181210 }
182211
212+ /**
213+ * Removes a polyline from the map.
214+ *
215+ * @param polyline the polyline to be removed from the map
216+ */
183217 @ SuppressWarnings ("squid:S3242" )
184218 public void removePolyline (GoogleMapPolyline polyline ) {
185219 this .getElement ().removeChild (polyline .getElement ());
0 commit comments