Share via

Bing map Census issue

Balasaheb Molawade 141 Reputation points
2022-07-11T11:56:05.117+00:00

Hi,

We have used below query to get the census data but getting error.

Query :

https://spatial.virtualearth.net/REST/v1/data/755aa60032b24cb1bfb54e8a6d59c229/USCensus2010_States/States?$select=*,__Distance&$top=250&$inlinecount=allpages&key=Our Bing map Key&$format=json&jsonp=Microsoft_Maps_Network_QueryAPI_1&spatialFilter=bbox(-90,-180,90,180)

Error:

Microsoft_Maps_Network_QueryAPI_1({"error":{"code":"InternalServerError","message":{"lang":"en-US","value":"Your request could not be completed because there was a problem with the service."}}})

Can anyone faced same issue and have solution for it.

Thanks!

Azure Maps
Azure Maps

An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.


1 answer

Sort by: Most helpful
  1. rbrundritt 21,706 Reputation points Volunteer Moderator
    2022-07-11T16:22:32.17+00:00

    Doing some testing, it seems it doesn't like the size of your bounding box. Looks like the bounding box doesn't like the lat/lon values representing a full globe. A slight modification to this seems to work. I used bbox(-89.99999,-180,90,179.999999)

    Also note, you likely don't want to include _Distance in the query since this wouldn't be very useful and would only max the request slightly slower.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.