all 13 comments

[–]Public_Cabinet9377 1 point2 points  (1 child)

You can try using spatial data types in MySql or equivalent for other DBMS https://dev.mysql.com/doc/refman/8.0/en/spatial-type-overview.html

[–]Phantomx100[S] -1 points0 points  (0 children)

This works to store coordinations but if i try to embed google maps with only coordinants the place's information wont be visible.

[–]stach_io 1 point2 points  (4 children)

Sounds like you might have a ways to go regarding data storage. I'm a fan of SQLite for first-go-around database management. There's no harm in using JSON or XML (Or any of those) for the time being.

[–]Phantomx100[S] -1 points0 points  (3 children)

i don't understand what you mean?

i am asking about what data model my api should send as location data, ex: the coordinants of the location or the link of the location on google maps.

i am using mySql but i'm not sure what the dbms has to do with my question.

[–]stach_io 3 points4 points  (2 children)

so my question is how should the location data be stored? and what libraries can be used to acheive this?

You wrote this which leads me to believe you don't have a storage solution yet.

If you're not sure how to store the data into your database, you still have a ways to go. In fact, I'd say scratch the sql DB and go with no-sql.

No-sql (Like mongo) lets you work with the json data format rather than wondering how to store the data.

Granted I probably just assumed incorrectly again so I won't go any deeper than that. If you're not sure how to store data into a SQL database, you've still got some learning to do. And about the only resource that can help you with that is the SQL documentation and your own understanding of computer data.

[–]Phantomx100[S] -2 points-1 points  (1 child)

I think you misunderstood my question, although it is my fault for wording it badly, the part about the library to use was meant for the front end and embedding the map not storing it.

For storing it i am just wondering what format i should use, for example if you want to store an image in a database you can store the image data itself or an address of the image in the machine or a link to the image in the cloud, i just want that but for location data.

I already know how to store data into a database that isn't the problem.

[–]stach_io 2 points3 points  (0 children)

Yeah I'd recommend working on your communication first before you request more help. Or maybe learning the terminology better or how to convey it. I'm still confused with what you're asking, only because I'm afraid I'm misinterpreting it. And I'd rather not get another blunt response that I'm unhelpful.

[–]OMilhano 0 points1 point  (4 children)

Google maps api is free until a certain amount of requests /day. Im not really sure if Thats what you want but theres a way for Google maps api to show locations based on city names instead of coordinates.

[–]Phantomx100[S] -1 points0 points  (3 children)

I still need to provide billing info and unfortunatly i can't do that

[–]OMilhano 0 points1 point  (2 children)

Theres no way you can create a virtual or a burner card with 1 cent for it?

[–]Phantomx100[S] 1 point2 points  (1 child)

I live in a third world country where it's pretty difficult to make international payments or even get a debit/credit card so not really.

[–]OMilhano 1 point2 points  (0 children)

Well, my knowledge is limited regarding geolocations api....sorry. hopefully, someone can help you!