-
Great library! |
Beta Was this translation helpful? Give feedback.
Answered by
saibotk
Jun 19, 2024
Replies: 1 comment 4 replies
-
Hey 👋 Sorry for the late reply, here is a simple example for adding a Polygon to the Ship model (has a polygon field called use Clickbar\Magellan\Data\Geometries\LineString;
use Clickbar\Magellan\Data\Geometries\Point;
use Clickbar\Magellan\Data\Geometries\Polygon;
// ....
$ship->poly = Polygon::make([
LineString::make([
Point::makeGeodetic(1, 1),
Point::makeGeodetic(2, 2),
Point::makeGeodetic(3, 3),
Point::makeGeodetic(1, 1),
]),
]);
$ship->save(); Hope this helps! |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
meniv-nl
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey 👋
Sorry for the late reply, here is a simple example for adding a Polygon to the Ship model (has a polygon field called
poly
)Hope this helps!