GLG Toolkit, JavaScript Library  Version 4.6
GlgGISRequestObserver Interface Reference

GlgGISRequestObserver object is used by the program receive notifications about the progress of a GIS map request. More...

Detailed Description

GlgGISRequestObserver object is used by the program receive notifications about the progress of a GIS map request.

The object is passed as a parameter of the RequestGISZoom, RequestGISMap and SetScrollbarObserver methods.

Public Member Functions

boolean AdjustRequest (GlgGISRequestData request_data)
 If RequestAdjustment returns true, this method is invoked before proceeding with the request to perform any desired adjustments to the request parameters. More...
 
boolean RequestAdjustment ()
 This method is invoked before proceeding with the request to determine if any adjustments need to be done. More...
 
void RequestUpdate (GlgObject gis_object, GlgGISRequestStatus status)
 This method is invoked with the status of the GIS request when the GIS request becomes ready or is aborted. More...
 

Static Public Member Functions

static GlgGISRequestObserver CreateGlgGISRequestObserver (function request_update_func, function request_adjustment_func, function adjust_request_func)
 Constructor. More...
 

Member Function Documentation

◆ AdjustRequest()

boolean AdjustRequest ( GlgGISRequestData  request_data)

If RequestAdjustment returns true, this method is invoked before proceeding with the request to perform any desired adjustments to the request parameters.

This may be used to adjust parameters of the request created by RequestGISZoom before the request is used to generate a new map image. The method must return true if any request paramets were modified.

Parameters
request_dataContains GIS parameters of the request.
Returns
true if any request paramets were modified, or false otherwise.

◆ CreateGlgGISRequestObserver()

static GlgGISRequestObserver CreateGlgGISRequestObserver ( function  request_update_func,
function  request_adjustment_func,
function  adjust_request_func 
)
static

Constructor.

Creates a GIS request observer that can be used as a parameter of the RequestGISZoom, RequestGISMap and SetScrollbarObserver methods. The static method is invoked on the GLG Toolkit handle obtained via a 'new GlgToolkit()' call at the application start-up.

Parameters
request_update_funcA function to be invoked with the status of the GIS request when the GIS request becomes ready or is aborted. The function's type signature must match the type signature of the RequestUpdate method.
request_adjustment_funcA function that determines if the request needs to be adjusted before proceeding. If it returns true, adjust_request_func will be invoked to perform any desired adjustments to the request parameters. The function's type signature must match the type signature of the RequestAdjustment method.
adjust_request_funcA function to be invoked to adjust request parameters before proceeding, if necessary. The function's type signature must match the type signature of the AdjustRequest method.
Returns
An opaque internal object representing a new GlgGISRequestObserver.

◆ RequestAdjustment()

boolean RequestAdjustment ( )

This method is invoked before proceeding with the request to determine if any adjustments need to be done.

If this method returns true, AdjustRequest will be invoked to adjust request parameters before proceeding. For example, a map projection or displayed GIS layers may need to be changed depending on the map zoom factor.

Returns
true to invoke AdjustRequest to adjust request parameters before proceeding, or false otherwise.

◆ RequestUpdate()

void RequestUpdate ( GlgObject  gis_object,
GlgGISRequestStatus  status 
)

This method is invoked with the status of the GIS request when the GIS request becomes ready or is aborted.

Parameters
gis_objectThe GIS object of the request.
statusThe reason this observer method is invoked, may be one of the following constants: