I am trying to store locations of users using the app, but Parse is not allowing me to have two columns of GeoPoint type in one table ie user. I am storing 2 addresses per user.
For now, I created 4 columns (address1Longtitude, address2Longtitude, address1Latitude, address2Latitude). Any better way to do this? I will use these later to plot on Google Maps and determine route.
Thanks,
Only one GeoPoint column can be used with any one object. you can create a table for location and another for address 1 and address 2 and make relations with these 2 tables. ex
GeoPointTable
__________________________
|ObjectID | geoPoint |
|__________|_______________|
|dfj5dfs45 |1.5424,75.2425 |
|jfhd73hd7 |5.5854,25.2425 |
|gtiudfs45 |3.8924,48.1225 |
LocationsTable
_________________________________
|ObjectID | address1 | address2 |
|__________|___________|__________|
|dffd5ss45 |dfj5dfs45 |jfhd73hd7 |
|ljf4zf43f |jfhd73hd7 |gtiudfs45 |
LocationTable Refers GeopointTable
另一个解决方案是将第二个GeoPoint(您将无法建立索引)放入单例数组中。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.