MapQuest Search API没有产生正确的结果

时间:2013-11-18 05:56:57

标签: mapquest

我在MapQuest Data Manager v2(DMv2)中有一些数据,我正在尝试使用他们的搜索API(Web服务)搜索这个托管数据集,但我没有得到理想的结果。以下是我正在使用的数据集和查询的快照:

这些是字段:

"storeid","brandname","onlineorderingenabled","street","zipcode","state","geocodereturncode","city","country","mqap_geography","mqap_quality","landmark","county","mqap_id","storename","longitude","latitude"

这是示例行:

"1","Chili's","true","12815 Preston Rd","75230-1302","TX","","Dallas","US","POINT (-96.80363 32.92329)","P1AAA","","Dallas","ca6b6bae-945f-45fc-a8d1-3d512796150d","Preston/LBJ-Chili's","",""

示例搜索查询:

http://www.mapquestapi.com/search/v2/search?key=[My_Key here]&shapePoints=-80,26&outFormat=json&hostedData=hostedData=mqap.121144_BrinkerStores|storename ILIKE ?|Preston/LBJ-Chili's|storeid,storename,city


http://www.mapquestapi.com/search/v2/radius?key=[My_Key]&origin=Dallas&inFormat=json&json={hostedData:[{tableName:mqap.121144_BrinkerStores,extraCriteria:City ILIKE ?,parameters:[Dallas],columnNames:[storeid,storename,city,state]}]}

我没有得到storedid,storenam,city,state。请帮帮我。

1 个答案:

答案 0 :(得分:0)

在搜索/ v2 /搜索请求中,请确保您的shapePoints是纬度,经度,而不是相反。商店名称中的撇号需要为postgres后端加倍撇号。

http://www.mapquestapi.com/search/v2/search?key=KEY&shapePoints=32.778149,-96.795403&hostedData=mqap.121144_BrinkerStores|storename=?|Knox-Chili%27%27s

在search / v2 / radius请求中,在json中包含origin,并将hostedData重命名为hostedDataList。

www.mapquestapi.com/search/v2/radius?key=KEY&inFormat=json&json={"origin":"Dallas,TX","hostedDataList":[{"tableName":"mqap.121144_BrinkerStores","extraCriteria":"City ILIKE ?","parameters":["Dallas"],columnNames:["storeid","storename","city","state"]}]}