How to search for locations in my data table?

2 posts / 0 new
Last post
volantesoft
How to search for locations in my data table?

Hello All,

new user and first post so please bear with me.

I have successfully uploaded data to a table I created using the Data Manager API.

The data is essentially a list of contacts and among the columns there is 'cap' (of type PostalCode) where zip codes are stored.

When using the Search API:

https://www.mapquestapi.com/search/v2/rectangle?maxMatches=5&ambiguities...|cap LIKE ?|21010&locations=Milano&locations=Borgomanero&outFormat=json&key=MYAPIKEY

Essentially, I want the location of contacts that have cap (zip code) LIKE 21010 but I get this result:

{
"boundingBox": {
"lr": {
"lng": 9.190498,
"lat": 45.466797
},
"ul": {
"lng": 8.462367,
"lat": 45.698911
}
},
"hostedData": [
{
"extraCriteria": "cap LIKE '21010'",
"columnNames": [],
"parameters": [
"21010"
],
"tableName": "mqap.MYAPIKEY_MY_CONTACT_TABLE"
}
],
"resultsCount": 0,
"totalPages": 1,
"options": {
"kmlStyleUrl": "http://search-b2b.cloud.mapquest.com/kml-default.kml",
"shapeFormat": "raw",
"maxMatches": 5,
"pageSize": 0,
"ambiguities": false,
"units": "m",
"currentPage": 1
},
"locations": [
{
"dragPoint": false,
"displayLatLng": {
"lng": 8.462367,
"lat": 45.698911
},
"adminArea4": "Province of Novara",
"adminArea5": "Borgomanero",
"postalCode": "",
"adminArea1": "IT",
"adminArea3": "PIEMONT",
"type": "s",
"sideOfStreet": "N",
"geocodeQualityCode": "A5XAX",
"adminArea4Type": "County",
"linkId": 282504717,
"street": "",
"adminArea5Type": "City",
"geocodeQuality": "CITY",
"adminArea1Type": "Country",
"adminArea3Type": "State",
"latLng": {
"lng": 8.462367,
"lat": 45.698911
}
},
{
"dragPoint": false,
"displayLatLng": {
"lng": 314159.265358,
"lat": 314159.265358
},
"adminArea4": "",
"adminArea5": "",
"postalCode": "",
"adminArea1": "",
"adminArea3": "",
"type": "s",
"sideOfStreet": "N",
"geocodeQualityCode": "XXXXX",
"adminArea4Type": "County",
"linkId": 0,
"street": "borgomanero",
"adminArea5Type": "City",
"geocodeQuality": "LATLNG",
"adminArea1Type": "Country",
"adminArea3Type": "State"
}
],
"info": {
"copyright": {
"imageAltText": "© 2019 MapQuest, Inc.",
"imageUrl": "http://api.mqcdn.com/res/mqlogo.gif",
"text": "© 2019 MapQuest, Inc."
},
"messages": [],
"statusCode": 0
}
}

 

So essentially it's giving me info about one of the locations I set for the bounding box and not the data that I have in the Data Table.

What Am I doing wrong? Eventually what should I do do display the contacts on a map? I've been searching for hours and couldn't find anything.

I'm very grateful to whoever can point me in the right direction.

 

Cheers.


MQBrianCoakley
This request will show the

This request will show the record.

 

https://www.mapquestapi.com/search/v2/radius?maxMatches=5&ambiguities=ignore&hostedData=mqap.TABLE|cap%20LIKE%20?|21010&origin=21010&key=KEY

 

The issue is that the cap column is type Postal Code so the Data Manager record is placed in Maryland, US, not in Italy.