/arcserver.rb

Library for accessing ESRI ArcServer REST and SOAP APIs.

Primary LanguageRubyMIT LicenseMIT

arcserver.rb

arcserver.rb is a unified interface for interacting with ESRI Arcserver (9.3+) SOAP and REST APIs from Ruby. Extra utility methods are also provided for generating legend images.

Installation

[sudo] gem install arcserver.rb

Optional: (some of the utility methods require RMagick)

[sudo] gem install rmagick

Quick Example

require 'arcserver'

# connect to a map server instance using either its REST or SOAP url
map_server = ArcServer::MapServer.new('http://sampleserver1.arcgisonline.com/ArcGIS/services/Portland/ESRI_LandBase_WebMercator/MapServer')

# get the default map name using the SOAP API
puts map_server.get_default_map_name

# get legend information using the SOAP API
puts map_server.get_legend_info

# export an image using the REST
puts map_server.export

Contributors

The following people have contributed their time and effort to arcserver.rb:

  • Colin Casey

  • Glenn Goodrich

Contribute

If you’d like to hack on arcserver.rb, start by forking my repo on GitHub:

http://github.com/colincasey/arcserver.rb

To get all of the dependencies, install the gem first. The best way to get your changes merged back into core is as follows:

  1. Clone your fork

  2. Create a thoughtfully named topic branch to contain your change

  3. Hack away

  4. Add tests and make sure everything still passes by running rake

  5. If you are adding new functionality, document it in the README

  6. Do not change the version number, I will do that on my end

  7. If necessary, rebase your commits into logical chunks, without errors

  8. Push the branch up to GitHub

  9. Send me (colincasey) a pull request for your branch

Copyright © 2010 Colin Casey. See LICENSE for details.