简体   繁体   English

Parse.com查询

[英]Parse.com query

have parse.com working perfect with my app and it querys and retrieves geopints no problem. 让parse.com与我的应用完美配合,它可以查询和检索geopints没问题。

what i would like to know is when a user scans an nfc tag my application takes these co-ordinates stored on that tag and places markers on a google map, nothing wrong there. 我想知道的是,当用户扫描nfc标签时,我的应用程序将这些坐标存储在该标签上,然后将标记放置在Google地图上,这没什么不对的。 but i would like it to query a third string which is being currently being taken in by my application but how can i get that 3rd string, example "route001" into this parse query : 但是我想查询我的应用程序当前正在使用的第三个字符串,但是如何将第三个字符串(例如“ route001”)放入此解析查询中:

    ParseQuery<ParseObject> query = ParseQuery.getQuery("route001");
    query.findInBackground(new FindCallback<ParseObject>() {

instead of it querying the same class every time it starts. 而不是每次启动时都查询相同的类。 hope this is clear. 希望这很清楚。

How are you storing GeoPoints? 您如何存储GeoPoints? Which class is it in? 这是哪个班的? And in which way are you binding the String to GeoPoint? 并以哪种方式将String绑定到GeoPoint? It looks like you're trying to link the GeoPoint you got from NFC to a String? 看起来您正在尝试将从NFC获得的GeoPoint链接到字符串? In that case, if GeoPoint is stored in instance of a class called "Location", you can simply save the String as another property for the "Location" instance. 在这种情况下,如果将GeoPoint存储在名为“ Location”的类的实例中,则只需将字符串另存为“ Location”实例的另一个属性。 Then query for Location, and limit the query by String. 然后查询位置,并通过字符串限制查询。 Code would look similar to this: 代码类似于以下内容:

ParseQuery<ParseObject> query = ParseQuery.getQuery("Location");
[query whereKey:@"stringPropertyName" equalTo:@"exampleString"];
query.findInBackground(new FindCallback<ParseObject>() {...});

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

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