I have created a map which allows the user to plot multiple markers with the intention on storing them in a database table. The original plan was to store multiple rows per one map like so:
------------------------------------
| mapentryid | mapid | Long | Lat |
------------------------------------
| 1 | 1 | X.XX | X.XX |
| 2 | 1 | X.XX | X.XX |
| 3 | 1 | X.XX | X.XX |
| 4 | 2 | X.XX | X.XX |
| 5 | 2 | X.XX | X.XX |
| 6 | 2 | X.XX | X.XX |
| 7 | 2 | X.XX | X.XX |
------------------------------------
But I have since found out that you are able to store multilinestring's in MySQL which sounds perfect for what I want (I think?)
I can insert the data correctly using the following SQL query format:
INSERT INTO table (LatLng)
VALUES (
MultiLineString(
LineString(Point(x),Point(y)),
LineString(Point(x),Point(y)),LineString(Point(x),Point(y))
)
This adds the multilinestring OK, although they actually come up as the following:
The question is, is the above OK? If so, how can I convert this data back into something I am able to display on Google Maps?