简体   繁体   中英

Parse.com query

have parse.com working perfect with my app and it querys and retrieves geopints no problem.

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. 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 :

    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? Which class is it in? And in which way are you binding the String to GeoPoint? It looks like you're trying to link the GeoPoint you got from NFC to a String? 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. 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>() {...});

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.

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