简体   繁体   English

解析GeoPoint限制

[英]Parse GeoPoint Limitation

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. 我正在尝试使用该应用程序存储用户的位置,但是Parse不允许我在一个表(即用户)中拥有两列GeoPoint类型。 I am storing 2 addresses per user. 我为每个用户存储2个地址。

For now, I created 4 columns (address1Longtitude, address2Longtitude, address1Latitude, address2Latitude). 现在,我创建了4列(address1Longtitude,address2Longtitude,address1Latitude,address2Latitude)。 Any better way to do this? 还有更好的方法吗? I will use these later to plot on Google Maps and determine route. 稍后,我将使用它们在Google Maps上绘图并确定路线。

Thanks, 谢谢,

Only one GeoPoint column can be used with any one object. 任何一个对象只能使用一个GeoPoint列。 you can create a table for location and another for address 1 and address 2 and make relations with these 2 tables. 您可以为位置创建一个表,为地址1和地址2创建另一个表,并与这2个表建立关系。 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 LocationTable引用GeopointTable

另一个解决方案是将第二个GeoPoint(您将无法建立索引)放入单例数组中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM