我進行了場地搜索,返回了重複的場地。除了會場編號和緯度/經度信息,重複的場地是相同的。在foursquare.com上執行相同的搜索,並且不顯示重複內容。我如何排除重複?場地搜索api返回不正確的經緯度的重複場地
這裏是API調用(負祕密): https://api.foursquare.com/v2/venues/search?ll=38.468807,-77.372589&query=starbucks
結果:
{
meta: {
code: 200
}
notifications: [
{
type: "notificationTray"
item: {
unreadCount: 0
}
}]
response: {
venues: [
{
id: "4e4dc886bd41b76bef93082e"
name: "Starbucks Coffee"
contact: {
phone: "5407209145"
formattedPhone: "(540) 720-9145"
}
location: {
address: "1495 Stafford Market Pl"
lat: 38.47310969662029
lng: -77.38591645407749
distance: 1256
postalCode: "22556"
city: "Stafford"
state: "VA"
country: "United States"
}
categories: [
{
id: "4bf58dd8d48988d1e0931735"
name: "Coffee Shop"
pluralName: "Coffee Shops"
shortName: "Coffee Shop"
icon: {
prefix: "https://foursquare.com/img/categories/food/coffeeshop_"
sizes: [ 32 44 64 88 256 ]
name: ".png"
}
primary: true
}]
verified: false
stats: {
checkinsCount: 13
usersCount: 11
tipCount: 0
}
specials: {
count: 0
items: [ ]
}
hereNow: {
count: 0
}
},
{
id: "4b8dd66ef964a520071033e3"
name: "Starbucks"
contact: {
phone: "5407209145"
formattedPhone: "(540) 720-9145"
}
location: {
address: "1495 Stafford Market Place"
crossStreet: "Garrisonville Road"
lat: 38.470214117289444
lng: -77.41142749786377
distance: 3388
postalCode: "22554"
city: "Stafford"
state: "VA"
country: "United States"
}
categories: [
{
id: "4bf58dd8d48988d1e0931735"
name: "Coffee Shop"
pluralName: "Coffee Shops"
shortName: "Coffee Shop"
icon: {
prefix: "https://foursquare.com/img/categories/food/coffeeshop_"
sizes: [ 32 44 64 88 256 ]
name: ".png"
}
primary: true
}]
verified: true
stats: {
checkinsCount: 1885
usersCount: 522
tipCount: 14
}
url: "http://www.starbucks.com/"
specials: {
count: 0
items: [ ]
}
hereNow: {
count: 0
}
menu: {
url: "https://foursquare.com/v/starbucks/4b8dd66ef964a520071033e3/menu"
mobileUrl: "https://foursquare.com/v/4b8dd66ef964a520071033e3/device_menu"
}
},
{
id: "4d87c7bba98841bd5eaf3055"
name: "Starbucks"
contact: {
phone: "5407209145"
formattedPhone: "(540) 720-9145"
twitter: "starbucks"
}
location: {
address: "1495 Stafford Market Place"
lat: 38.50188672
lng: -77.37500964
distance: 3688
postalCode: "22556"
city: "Stafford"
state: "Virginia"
country: "United States"
}
categories: [ ]
verified: true
stats: {
checkinsCount: 17
usersCount: 11
tipCount: 0
}
specials: {
count: 0
items: [ ]
}
hereNow: {
count: 0
}
}
}
}
第二場地,ID = 4b8dd66ef964a520071033e3,是實際的。其他2個是重複的。
你能提供實際的API調用(減去祕密)和結果?沒有更多細節,不可能幫助您進行調試。 – akdotcom 2012-03-06 20:52:05