diff --git a/src/Point.php b/src/Point.php index 271a77e..5a3078d 100644 --- a/src/Point.php +++ b/src/Point.php @@ -9,4 +9,22 @@ class Point extends Data public function __construct(public float $lat, public float $lon) { } + + public function imageUrl(): string + { + return '/osm-static-maps/?' . http_build_query([ + 'center' => $this->lon . ',' . $this->lat, + 'zoom' => 20, + 'maxZoom' => 13, + ]); + } + + public function markerUrl(): string + { + return '/osm-static-maps/?' . http_build_query([ + 'geojson' => json_encode(['type' => 'Point', 'coordinates' => [$this->lon, $this->lat]]), + 'zoom' => 20, + 'maxZoom' => 18, + ]); + } }