openlayers/openlayers — pull request #80 by freakalis (2011-11-30 13:03:46+00:00)
Title: Remove parameters that aren't supported by ArcGIS to improve REST performance

I recently discovered that sending extra parameter to the ArcGIS REST server increases loading time.

Example url 1

http://gisak.alingsas.se/ArcGIS/rest/services/Busslinjer/MapServer/export?URL=http%3A%2F%2Fgisak.alingsas.se%2FArcGIS%2Frest%2Fservices%2FBusslinjer%2FMapServer&LAYERS=&PARAMS=[object%20Object]&OPTIONS=[object%20Object]&ARCGIS_METHOD=rest&LAYER_TYPE=openlayers_layer_type_arcgis&PROJECTION=EPSG%3A3007&LAYER_HANDLER=arcgis&VECTOR=true&BASELAYER=false&TERMS=&TRANSPARENT=true&TITLE=Busslinjer&WEIGHT=16&DRUPALID=Busslinjer&BUFFER=2&FORMAT=png24&BBOX=178732.468321%2C6422204.68643%2C179816.203822%2C6423288.421931&SIZE=256%2C256&F=image&BBOXSR=3007&IMAGESR=3007

Takes about 500ms - 1s to load.

Example url 2

http://gisak.alingsas.se/ArcGIS/rest/services/Busslinjer/MapServer/export?VECTOR=true&BASELAYER=false&TRANSPARENT=true&FORMAT=png24&BBOX=178732.468321%2C6422204.68643%2C179816.203822%2C6423288.421931&SIZE=256%2C256&F=image

Takes about 140-170 ms to load

I added an extra getFullRequestString function in OpenLayers.Layer.ArcGIS93Rest that removes all parameters that are not supported by ArcGIS REST API. http://sampleserver1.arcgisonline.com/ArcGIS/SDK/REST/index.html