OpenData API

2113
0
09-10-2015 11:34 AM
RubenSchoenefeld
New Contributor

Hi -

I'm trying to use one of our layers available as an OpenData export API in OpenLayers. At first, I was trying to use the BBOX strategy, thinking that it was the best way to filter the data for the user. OpenLayers attaches the bbox parameter to the URL in the following format:

[...]_0.geojson?bbox=408089.48072144,4509936.1932796,427160.51927856,4521936.8067204

However, OpenData doesn't accept this as a bounding box and instead wants the following format:

[...]_0.geojson?where=&geometry={"xmin":-15518551.2305655,"ymin":4072458.8381785434,"xmax":-9339993.360219777,"ymax":5540049.781253537,"spatialReference":{"wkid":102100,"latestWkid":3857}}

Has anybody gotten the OpenLayers BBOX strategy to play nice with ESRI OpenData?

The reason I even want to use the a bounding box when requesting the data is because the layer contains enough data to take a while to load, which brings up my second headache with the OpenData API. When requesting large datasets, instead of getting back any data, I'm getting back the following reply:

{"status":"Processing","processing_time":0,"count":3276}

It's very unpredictable however. Sometimes, when I reload the application, after loading between 30 seconds and a couple of minutes, I'm getting the whole set of data back and sometimes, I'm seeing this "Processing" answer. Is there an API parameter I can provide to OpenData that will prevent this?

Thank you.

Ruben

0 Kudos
0 Replies