* Render a circle to SVG
(circle)
| 328 | * Render a circle to SVG |
| 329 | */ |
| 330 | circleToSVG(circle) { |
| 331 | const latCenter = circle.coord[1]; |
| 332 | const radiusInPixel = geoutils.meterToPixel(circle.radius, this.zoom, latCenter); |
| 333 | const x = this.xToPx(geoutils.lonToX(circle.coord[0], this.zoom)); |
| 334 | const y = this.yToPx(geoutils.latToY(circle.coord[1], this.zoom)); |
| 335 | return ` |
| 336 | <circle |
| 337 | cx="${x}" |
| 338 | cy="${y}" |
| 339 | r="${radiusInPixel}" |
| 340 | style="fill-rule: inherit;" |
| 341 | stroke="${circle.color}" |
| 342 | fill="${circle.fill}" |
| 343 | stroke-width="${circle.width}" |
| 344 | /> |
| 345 | `; |
| 346 | } |
| 347 | |
| 348 | /** |
| 349 | * Render text to SVG |
no test coverage detected