|
GLG Toolkit, JavaScript Library
Version 4.6
|
GlgGISRequestObserver object is used by the program receive notifications about the progress of a GIS map request. More...
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... | |
| 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.
| request_data | Contains GIS parameters of the request. |
|
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.
| request_update_func | A 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_func | A 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_func | A 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. |
| 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.
| 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.
| gis_object | The GIS object of the request. |
| status | The reason this observer method is invoked, may be one of the following constants: |