The Other Web Map: Creating Map Images with Python

1980
0
01-05-2016 12:49 PM

The Other Web Map: Creating Map Images with Python

Task:

Create data that will be compiled into one or more PDF reports.  Each report includes a map image, a legend, a table of indeterminate length, a header, and a footer.  The report generation is launched from an application that can display maps, but is probably not displaying a map when the report is requested.  The user may have a skinny-band Internet connection (not a broad-band Internet connection).

Solution:

I considered three options for creating the map image, all using the Export Web Map Task.

Create the map in a browser window using the JavaScript API.

Define the map in a template and use a geoprocessing task to pan to the location and set definition queries to eliminate extraneous features.

Use a geoprocessing task to build a JSON object defining the map using the ExportWebMap Specification in the REST API.

The first option was not practical because it required passing the map data to the client and then back to the server.  A bad idea even if the user isn’t saddled with a skinny-band Internet connection.

The second option would have been difficult to maintain, especially in multiple environments (development, staging, and production).

I selected the third option for its flexibility, its extensibility, its use of server side processing, and its ability to access the geodatabase directly.

In this presentation, I will provide the attendees with an outline for a Python script that creates a map image.

Version history
Last update:
‎01-05-2016 12:49 PM
Updated by:
Contributors