startup Method

Description

Starts and shows the ESD/SPD Web editor. The startup method requires a single parameter: an object containing the properties to be set.

Syntax

.startup(/* Object */ configuration)

Parameters

configuration: Object

An object containing the following properties:

serviceUrl: String (required)

The URL of the ESD/SPD Web service. Note: If the web service is hosted on an Apache server, the URL will likely look like http://servername/soap. An IIS hosted service URL will look like http://servername/ESD_WEB_SERVICE/mod_esdraw.dll?drawweb. For more details, see Web Service Installation.

userId: String (required)

The ID of the current user.

licenseId: String (required)

The license ID provided by PAE.

features: Array (optional)

The set of features supported by the web server license as an array of strings. The following are the list of available features:

  • STRUCTURES - Enables structures drawing and manipulation
  • GIS - Enables mapping

Note: Street features do not have to be asked for as all of our various products include it. Also, keep in mind that you can only request features that your license actually supports.

templateServiceUrl: String (optional)

The URL of the template Web service. If provided you will have to setup your own REST end points as described in the Template Service documentation. If omitted the application will serve the default templates from the installed web service.

requestTimeout: String (optional)

The timeout for web service requests in milliseconds.

showToolbar: Boolean (optional)

Indicates whether or not to display the toolbar.

showSymbolManager: Boolean (optional)

Indicates whether or not to display the symbol manager.

maxLogExceptions: Number (optional)

The maximum number of exceptions retained in the exception log.

beginZIndex: Number (optional)

The lowest z-index that will be used by the visual components of the web editor.

maxImportedImageSize: Number (optional)

The maximum total number of pixels allowed in an imported image before it is resampled.

scaledJPEGImageQuality: Number (optional)

The quality setting used when scaling imported JPEG images.

helpVideoUrl: String (optional)

The URL of the help video definition file.

userSettingDefaults: Object (optional)

Specifies the default values for user settings.

templateLibraryUrl: String (optional)

The URL of a custom template definition file.

lassoedAreasEnabled: Boolean (optional)

Indicates whether or not the lassoed area functionality is enabled.

pointerDevice: String (optional)

This property defines the pointer mode the application will run in. Refer to the documentation for pointerDevice property for a list of valid values.

Remarks

This method starts and shows the ESD/SPD Web editor. The editor is inserted into the DOM node specified in the constructor of the ESDWeb object. This node must be in the DOM and visible before startup is called. Most editor methods are supported only after startup has been called. However, the defineTemplateAction method must be called before startup.

Example 1

editor = new ESDWeb(null, 'editorNode');

editor.startup({
			serviceUrl: 'http://www.yourdomain.com/esd',
			licenseId: '===License ID===',
			features: ['GIS', 'STRUCTURES'],
			userId: 'sample-user-id',
			requestTimeout: 10 * 1000, // Set the request timeout (10 seconds)
			showToolbar: true,         // Enable the toolbar and symbol manager.
			showSymbolManager: true,
			maxLogExceptions: 20,      // Set the maximum number of retained log exceptions
			beginZIndex: 50            // Set the z-index
		});
		


If your application hosts the editor in a modal window, the call to startup must occur after the modal window is created and shown. When using the popular Twitter bootstrap library your code might look something like Example 2. Refer to your library/toolkit's documentation for more information.

Example 2

$('#myModal').on('shown.bs.modal', function (e) {
    editor.startup(configuration)
})