Stay Connected with the Boundless Blog

Improving Interoperability between OpenLayers and Esri ArcGIS REST

Boundless continues to see many customers migrate over to hybrid geospatial architectures of both open source and proprietary software.  One of the most common customer requests is to leverage current investments in Esri ArcGIS, while building flexibility and agility into the architecture with the use of open-source.  Customers are looking to make the most of what they have, while not locking into a single-vendor option for years to come.

The latest hybrid integration we are seeing is between open-source web applications built with OpenLayers 3, and existing map, image and feature services published by ArcGIS Server.  So this last half year we’ve been hard at work improving the interoperability between OpenLayers 3 and Esri ArcGIS REST Services. The culmination of this work has resulted in both additions to OpenLayers 3 as well as a new library called olé.

OpenLayers 3 has support for Layer sources for tile data from ArcGIS REST services via ol.source.TileArcGISRest supporting both Map and Image Services. However, if you wish to use cached ArcGIS Services, better performance is obtained by using the ol.source.XYZ data source. In addition, you can now use the ArcGIS REST Capabilities via the newly-developed ole.LayerGenerator to generate the correct OpenLayers layer and source configuration.

Esri_ol3_1

OpenLayers can also talk to ArcGIS REST Feature Services out of the box, using Esri JSON as the common transport layer. The REST API is pretty easy to use – here’s an OpenLayers example of the code for adding new features and modifying existing features: http://openlayers.org/en/v3.11.2/examples/vector-esri-edit.html

Since ArcGIS REST uses a different styling language than OpenLayers, styles need to get translated. We have addressed this missing piece with the addition of ole.VectorLayerModifier.modifyLayer, which is fed the JSON response of a layer on an ArcGIS REST Feature Service.

This is an example on ole:
Esri_ol3_2

This is what the same layer looks like in ArcGIS Online:
Esri_ol3_3So to recap OpenLayers now has the following support:

  • support for ArcGIS Image, Map and Tiled Map Services
  • support for automatically generating layer and source config from ArcGIS REST capabilities
  • read and write support for Esri JSON
  • support for translation of ArcGIS styles to OpenLayers styles

We hope that this integration work will further assist those who are looking to leverage their current investment in ArcGIS Server, while integrating more open source capabilities into their architecture.

Acknowledgement: some of this work was inspired by Esri’s Terraformer ArcGIS Parser library

Bart van den Eijnden

Software Engineer

Bart works on OpenLayers 3 and GeoExt. Bart has a strong interest in the standards of the Open Geospatial Consortium (OGC). Bart is also part of the project steering committee (PSC) of GeoExt and OpenLayers.