0

I would like to call different geo webservice in order to get the data with the geo location. for example I would like to search restaurants in san francisco from google place api, yelp api.

let say i will get the following data.

google: restaurant A, address A, latlng(x1,y1) ,restaurant B, address B, latlng(x2,y2)

yelp: restaurant C, address C, latlng(x3,y3) ,restaurant B1, address B1, latlng(x2.1,y2.1)

the situation is restaurant B and B1 are actually the same. A and C are different. and I need to display in my app with A, B, C restaurants.

How can I identify the difference of the result based on the name, address and latlng?

my solution is

  1. compare the name with string first, if 100% same then return.
  2. compare the address with street number, street name, zipcode, if 100% same then return
  3. compare the coordinate, if the distance((x1,y1),(x2,y2)) < 10m then return.

I would like to ask if any better solution?

4

0 回答 0