* center * Set/Get the map center * @param loc2? Array [lon,lat] to set the center to * @param duration? Duration of the transition in milliseconds, defaults to 0ms (asap) * @return map center -or- this
(loc2, duration)
| 654 | * @return map center -or- this |
| 655 | */ |
| 656 | center(loc2, duration) { |
| 657 | if (loc2 === undefined) { |
| 658 | return this.centerLoc(); |
| 659 | } else { |
| 660 | return this.setMapParams(loc2, undefined, undefined, duration ?? 0); |
| 661 | } |
| 662 | } |
| 663 | |
| 664 | |
| 665 | /** |
no test coverage detected