()
| 219 | |
| 220 | |
| 221 | def test_polygon_marker(): |
| 222 | m = Map() |
| 223 | locations = [ |
| 224 | [35.6636, 139.7634], |
| 225 | [35.6629, 139.7664], |
| 226 | [35.6663, 139.7706], |
| 227 | [35.6725, 139.7632], |
| 228 | [35.6728, 139.7627], |
| 229 | [35.6720, 139.7606], |
| 230 | [35.6682, 139.7588], |
| 231 | [35.6663, 139.7627], |
| 232 | ] |
| 233 | polygon = Polygon(locations=locations, popup="I am a polygon") |
| 234 | polygon.add_to(m) |
| 235 | |
| 236 | expected_options = { |
| 237 | "bubblingMouseEvents": True, |
| 238 | "color": "#3388ff", |
| 239 | "dashArray": None, |
| 240 | "dashOffset": None, |
| 241 | "fill": False, |
| 242 | "fillColor": "#3388ff", |
| 243 | "fillOpacity": 0.2, |
| 244 | "fillRule": "evenodd", |
| 245 | "lineCap": "round", |
| 246 | "lineJoin": "round", |
| 247 | "noClip": False, |
| 248 | "opacity": 1.0, |
| 249 | "smoothFactor": 1.0, |
| 250 | "stroke": True, |
| 251 | "weight": 3, |
| 252 | } |
| 253 | |
| 254 | m._repr_html_() |
| 255 | expected_rendered = f""" |
| 256 | var {polygon.get_name()} = L.polygon( |
| 257 | {locations}, |
| 258 | {{ |
| 259 | "bubblingMouseEvents": true, |
| 260 | "color": "#3388ff", |
| 261 | "dashArray": null, |
| 262 | "dashOffset": null, |
| 263 | "fill": false, |
| 264 | "fillColor": "#3388ff", |
| 265 | "fillOpacity": 0.2, |
| 266 | "fillRule": "evenodd", |
| 267 | "lineCap": "round", |
| 268 | "lineJoin": "round", |
| 269 | "noClip": false, |
| 270 | "opacity": 1.0, |
| 271 | "smoothFactor": 1.0, |
| 272 | "stroke": true, |
| 273 | "weight": 3 |
| 274 | }} |
| 275 | ) |
| 276 | .addTo({m.get_name()}); |
| 277 | """ |
| 278 |
nothing calls this directly
no test coverage detected