How to obtain latitude and longitude? #108
Unanswered
RezaMortezaee
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Hey 👋 You only need those when you create a Point in code manually. The database can store both coordinates in a single field and magellan casts it to a Point. Use the magellanPoint() function in a migration to create such a column in the database. Hope this helps 🙌 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Can anyone please tell me how I should obtain latitude and longitude to make a point class?
In the example of package documentation, should the Port model have separate latitude and longitude fields in the database with a data type of float plus a location field?
As an example, is this what it should be like:
'location' => Point::makeGeodetic($this->latitude , $this->longitude)
OR there are other ways to get those?
Beta Was this translation helpful? Give feedback.
All reactions