|
GLG Toolkit, C# Class Library
Version 4.6
|
This group contains methods for handling asynchronous GIS map loading requests. More...
This group contains methods for handling asynchronous GIS map loading requests.
Functions | |
| void | AbortGISRequest (String resource_name) |
| Aborts a GIS object's asynchronous map loading request in progress, if any. More... | |
| GlgGISRequestObserver | GetGISRequestInfo (String resource_name) |
| Obtains information about an asynchronous map loading request in progress for the GIS object the method is invoked on. More... | |
| bool | InstallGISRequest (String resource_name) |
| Installs a new map received by the GIS request in the GIS object. More... | |
| bool | RequestGISMap (String resource_name, double extent_x, double extent_y, double center_x, double center_y, double angle, GlgProjectionType projection, String layers, GlgGISRequestFlags flags, GlgGISRequestObserver request_observer) |
| Initiates an asynchronous GIS map loading request. More... | |
| bool | RequestGISZoom (String resource_name, char type, double value, GlgGISRequestObserver request_observer) |
| Initiates an asynchronous GIS zooming or panning request compatible with the SetZoom method interface. More... | |
| GlgGISRequestObserver | SetScrollbarObserver (String resource_name, GlgGISRequestObserver request_observer) |
| Controls the the way integrated scrollbars work for the GIS object. More... | |
| void AbortGISRequest | ( | String | resource_name | ) |
Aborts a GIS object's asynchronous map loading request in progress, if any.
| resource_name | A resource path of a child GIS object, or null to abort an asynchronous map loading request for the GIS object the method is invoked on. The resource path is relative to the invoking object. |
| GlgGISRequestObserver GetGISRequestInfo | ( | String | resource_name | ) |
Obtains information about an asynchronous map loading request in progress for the GIS object the method is invoked on.
| resource_name | A resource path of a child GIS object, or null to query the GIS object the method is invoked on. The resource path is relative to the invoking object. |
| bool InstallGISRequest | ( | String | resource_name | ) |
Installs a new map received by the GIS request in the GIS object.
This method may be invoked only from inside of a request observer's RequestUpdate method invoked with the GIS_REQUEST_READY status.
| resource_name | A resource path of a child GIS object, or null to use the GIS object the method is invoked on. The resource path is relative to the invoking object. |
The DEMOS_C#/AirTrafficExt/GlgAirTrafficDemoExt.cs in the GLG installation directory proides an example of using the method to install the received map.
| bool RequestGISMap | ( | String | resource_name, |
| double | extent_x, | ||
| double | extent_y, | ||
| double | center_x, | ||
| double | center_y, | ||
| double | angle, | ||
| GlgProjectionType | projection, | ||
| String | layers, | ||
| GlgGISRequestFlags | flags, | ||
| GlgGISRequestObserver | request_observer | ||
| ) |
Initiates an asynchronous GIS map loading request.
The easiest way to change a map displayed inside a GIS object is by changing the GIS object's parameters to specify a new map area, a new map projection or new map layers. If a synchronous map loading mode is used, the application will freeze while the new map is being loaded. If an asynchronous map loading mode is used, dynamic symbols on the map are displayed at the new map positions right away, but without the background map, with the new map appearing when it is received from the server. Both of these modes are undesirable, and an asynchronous GIS request offers a solution.
Instead of changing GIS parameters, an application can issue an asynchronous GIS map request that requests a new map from the map server. While the request is being loaded, the application continues to update dynamic icons on the map in its current state, and switches to the new map when the new map is received. This avoids displaying no map while the new map is being loaded.
The RequestGISMap method is used to issue an asynchronous GIS map request by specifying parameters of the new map. The method's request_observer parameter specifies a request observer that will be invoked when the map is ready. When the new map image is either ready or aborted, the request observer's RequestUpdate method will be invoked with the status information. The observer can install a successfully prepared request via the InstallGISRequest method, or do nothing to cancel the request. See GlgGISRequestObserver for more information.
The method aborts any asynchronous map loading request in progress for the GIS object the method is invoked on.
| resource_name | A resource path of a child viewport with the GIS zoom mode, or null to use the viewport the method is invoked on. The resource path is relative to the invoking object. |
| extent_x | Specifies a new GIS x extent. |
| extent_y | Specifies a new GIS y extent. |
| center_x | Specifies a new GIS x center. |
| center_y | Specifies a new GIS y center. |
| angle | Specifies a new GIS angle. |
| projection | Specifies a new GIS projection. |
| layers | Specifies a new GIS layer string. |
| flags | Controls which GIS object's parameters will be updated and is formed as a bitwise OR the following flags: |
| request_observer | Specifies an observer whose RequestUpdate method will be invoked with status updates. See GlgGISRequestObserver for more information. |
The DEMOS_C#/AirTrafficExt/GlgAirTrafficDemoExt.cs in the GLG installation directory proides an example of using the method to load a new map.
| bool RequestGISZoom | ( | String | resource_name, |
| char | type, | ||
| double | value, | ||
| GlgGISRequestObserver | request_observer | ||
| ) |
Initiates an asynchronous GIS zooming or panning request compatible with the SetZoom method interface.
The easiest way to zoom or scroll a map displayed inside a GIS object is by using the SetZoom method, which changes the GIS object's parameters to perform the requested zoom or pan operation. If a synchronous map loading mode is used, the application will freeze while the new map is being loaded. If an asynchronous map loading mode is used, dynamic symbols on the map are displayed in the new map zoom state right away, but without the background map, with the new map appearing when it is received from the server. Both of these modes are undesirable, and an asynchronous GIS request offers a solution.
Instead of using SetZoom, an application can issue an asynchronous GIS map request that requests a new zoomed or scrolled map from the map server. While the request is being loaded, the application continues to update dynamic icons on the map in its current state, and switches to the new map when the new map is received. This avoids displaying no map while the new map is being loaded.
The RequestGISZoom method is used to issue an asynchronous GIS map request in a way compatible with the SetZoom method, which allows to use the same zoom or pan parameters to request asynchronous GIS zoom or pan request.
The method uses an addition request_observer parameter that specified a request observer that will be invoked when the map is ready. When the new map image is either ready or aborted, the request observer's RequestUpdate method will be invoked with the status information. The observer can install a successfully prepared request via the InstallGISRequest method, or do nothing to cancel the request. See GlgGISRequestObserver for more information.
The method aborts any asynchronous map loading request in progress for the GIS object the method is invoked on.
| resource_name | A resource path of a child viewport with the GIS zoom mode, or null to use the viewport the method is invoked on. The resource path is relative to the invoking object. |
| type | A char value that specifies the type of the zoom or pan operation to perform. For example, 'i' may be used to zoom in. See the type parameter of the SetZoom method for a list of possible values. |
| value | Specifies the amount to zoom or pan by. See the value parameter of the SetZoom method for more information. |
| request_observer | Specifies an observer whose RequestUpdate method will be invoked with status updates. See GlgGISRequestObserver for more information. |
The DEMOS_C#/AirTrafficExt/GlgAirTrafficDemoExt.cs in the GLG installation directory proides an example of using the method to zoom and pan the map.
| GlgGISRequestObserver SetScrollbarObserver | ( | String | resource_name, |
| GlgGISRequestObserver | request_observer | ||
| ) |
Controls the the way integrated scrollbars work for the GIS object.
| resource_name | A resource path of a child GIS object, or null to set scrollbar observer of the GIS object the method is invoked on. The resource path is relative to the invoking object. |
| request_observer | Specifies a request observer:
|
The DEMOS_C#/AirTrafficExt/GlgAirTrafficDemoExt.cs in the GLG installation directory proides an example of using scrollbar observers to load a new map when the map is scrolled using the integrated scrollbars.
See GlgGISRequestObserver for more information.