OpenLayers. | |
Constants | |
DEFAULT_PARAMS | {Object} Hashtable of default parameter key/value pairs |
i18n_wait_options_msg | {String} Wait msg |
i18n_wait_options_progress_text | {String} Wait progress text |
i18n_wait_options_completed_text | {String} Completed : |
i18n_wait_options_of_text | {String} of |
i18n_no_layer_queryable | {String} No layer is queryable |
i18n_warning | {String} Warning text |
i18n_message_no_result_msg | {String} No result message |
i18n_message_no_result_title | {String} No result title |
Properties | |
APIProperty: drawMode | {string} |
queryablelayers | {Array(String)} Layers that are queryable with GetFeatureInfo requests |
markerLayer | {<OpenLayers.Layer.Vector>} Layer used to point a marker where the user clicked. |
marker | {<OpenLayers.Feature.Vector>} Point feature created/updated on click |
results | {Array(<Openlayer.Result>)} An array of Result objects used to render the results of the query. |
queries | {Integer} The number of queries received. |
errors | {Integer} When an error occurs on the response of a query, this number is incremented. |
features | {Array(<OpenLayers.Feature>)} Array of features created from the responses received. |
features | {Array(String)} Array of html results returned by queries using ‘text/html’ info_format parameter. |
featurepanels | {Array(<OpenLayers.FeaturePanel>)} Array of FeaturePanel objects used to render the results of the query. |
getFeaturesResource | {Array(Functions)} Array of functions to forward the resource to getFeatures. |
DEFAULT_MARKER_STYLE | {Object} Used for the StyleMap for the markerLayer if no markerStyle is providen. |
progressBar | {Ext.ProgressBar} |
modifiers | {Object} The event modifiers to use, according to the current event being handled by this control’s handlers |
Functions | |
OpenLayers. | Create a new QueryOnClick control. |
getResourceNameByLayer | Returns the resource name of a layer given a service type. |
onClick | Called by this click handler when the user click the map. |
getFeatures | Retreive the features from the query response and add them to this.features. |
onError | Called when an error occurs with the AJAX request |
removeMarker | Remove the query marker from the map. |
resetResults | Reset all results content. |
resetQueryData | Reset all properties used for a query and reset all result panels. |
resetQueryData | Reset ‘feature-related’ properties, such as : removing markers, reseting features and htmlResults |
showResult | If results were found, add a marker where the user clicked and call each result “showResult” function. |
showWaitMessageBox | Shows a “wait message” in a Ext.Window with a ProgressBar. |
hideWaitMessageBox | Hides the “wait message” Ext.Window. |
updateProgressBar | Update the “wait message” window with the current queries completed. |
setMap | Set the map property for the control and all handlers. |
getResourceByName | Returns the resource object inside this widget using its name. |
setModifiers | Sets the multiple modifiers according to the current event |
showMessage | Display a Ext.MessageBox and hide it after 2 seconds. |
{Array(Functions)} Array of functions to forward the resource to getFeatures.
onClick: function( evt )
Called by this click handler when the user click the map.
First, the current query data is reset and all result panels are reset too. Second, each resources are validated : is there a layer currently visible that has the resource ? Third, all queryable resource builds a query and send it.
getFeatures: function( response, resource )
Retreive the features from the query response and add them to this.features. The number of result received is incremented (this.queries). When the last result is received, the method showResult is called.
response | {AJAX} Ajax response |
resource | {String} Name of the resource |
Returns the resource name of a layer given a service type.
getResourceNameByLayer: function( szLayer, szServiceType )
Called by this click handler when the user click the map.
onClick: function( evt )
Retreive the features from the query response and add them to this.features.
getFeatures: function( response, resource )
Called when an error occurs with the AJAX request
onError: function( response )
Remove the query marker from the map.
removeMarker: function()
Reset all results content.
resetResults: function( options )
Reset all properties used for a query and reset all result panels.
resetQueryData: function( options )
If results were found, add a marker where the user clicked and call each result “showResult” function.
showResult: function()
Shows a “wait message” in a Ext.Window with a ProgressBar.
showWaitMessageBox: function()
Hides the “wait message” Ext.Window.
hideWaitMessageBox: function()
Update the “wait message” window with the current queries completed.
updateProgressBar: function()
Set the map property for the control and all handlers.
setMap: function( map )
Returns the resource object inside this widget using its name.
getResourceByName: function( resourceName )
Sets the multiple modifiers according to the current event
setModifiers: function( evt )
Display a Ext.MessageBox and hide it after 2 seconds.
showMessage: function( title, message, icon )