parse.com - Parse SDK - similarTo type of query -


i have app in ios , android , i'm getting user's location in both of them! corelocation ios , google maps in android... after location retrieval, apply reverse geocoding, locality out of them... once do, perform equalto queries find photos of specific location...

the thing is, there occasions locality of ios, different android's! example, "palaiochori" in ios , "paleochori" in android! observe 2 letters different!

so, whereas location same in both devices, equalto query fail!

what want know, if there way create type of query, don't check equality. instead, check similarity!

notice, use cloud code, server-side solution acceptable , preferred!!

clearly location name can not guarantee uniqueness. 2 possible solutions:

  1. ensure consistency of database

store geopoint these locations. when have palaiochori in database , user finds himself in paleochori, before saving new object, run wherenear() query see if have near places location.

if have results within reasonable radius, ask user: mean <list of near places>? user recognize place similar name, , tap on it. way avoid duplication.

  1. use consistent location database

as have lat/lng, use google places api ask places near location. google return place object unique placeid can store in database. id guaranteed remain same , can used queries reliably.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -