org.gwtopenmaps.openlayers.client.layer
Class HTTPRequestLayer

java.lang.Object
  extended by org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
      extended by org.gwtopenmaps.openlayers.client.OpenLayersObjectWrapper
          extended by org.gwtopenmaps.openlayers.client.OpenLayersEObjectWrapper
              extended by org.gwtopenmaps.openlayers.client.layer.Layer
                  extended by org.gwtopenmaps.openlayers.client.layer.HTTPRequestLayer
Direct Known Subclasses:
GridLayer

public class HTTPRequestLayer
extends Layer

Wrapper of OpenLayers.Layer.HTTPRequest in OpenLayers. Renamed HTTPREquest to HTTPRequestLayer so it is not confused with HTTPRequest in GWT. HTTPRequest in GWT provides functionality to make basic HTTP requests. HTTPRequestLayer in GWT-OL supports ... From OL API docs:

Author:
Edwin Commandeur - Atlis EJS, Michel Vitor A Rodrigues - Intec

Field Summary
 
Fields inherited from class org.gwtopenmaps.openlayers.client.layer.Layer
ARCGIS93REST_CLASS_NAME, BOXES_CLASS_NAME, GOOGLE_CLASS_NAME, GRIDLAYER_CLASS_NAME, HTTPREQUESTLAYER_CLASS_NAME, IMAGE_CLASS_NAME, MARKERS_CLASS_NAME, OSM_CLASS_NAME, TMS_CLASS_NAME, VECTOR_CLASS_NAME, WMS_CLASS_NAME, XYZ_CLASS_NAME
 
Fields inherited from class org.gwtopenmaps.openlayers.client.OpenLayersEObjectWrapper
eventListeners
 
Constructor Summary
protected HTTPRequestLayer(JSObject httpRequestLayer)
           
  HTTPRequestLayer(String name, String[] urls, WMSParams params)
          Constructor: HTTPRequestLayer Parameters: name - {String} url - {Array (String)} params - {WMSParams}
  HTTPRequestLayer(String name, String[] urls, WMSParams params, HTTPRequestLayerOptions options)
          Constructor: HTTPRequestLayer Parameters: name - {String} url - {Array (String)} params - {WMSParams} options - {HTTPRequestLayerOptions} Hashtable of extra options to tag onto the layer
  HTTPRequestLayer(String name, String url, WMSParams params)
          Constructor: HTTPRequestLayer Parameters: name - {String} url - {String} params - {WMSParams}
  HTTPRequestLayer(String name, String url, WMSParams params, HTTPRequestLayerOptions options)
          Constructor: HTTPRequestLayer Parameters: name - {String} url - {String} params - {WMSParams} options - {HTTPRequestLayerOptions} Hashtable of extra options to tag onto the layer
 
Method Summary
 HTTPRequestLayer clone(HTTPRequestLayer obj)
          APIMethod: clone Parameters: obj - {HTTPRequest} Returns: {HTTPRequest} An exact clone of this HTTPRequest
 void destroy()
          APIMethod: destroy
 String getFullRequestString(WMSParams newParams, String altUrl)
          Method: getFullRequestString Combine url with layer's params and these newParams.
 boolean mergeNewParams(Params params)
          APIMethod: mergeNewParams Parameters: newParams - {Object} Returns: redrawn: {Boolean} whether the layer was actually redrawn.
 HTTPRequestLayer narrowToHTTPRequestLayer(JSObject httpRequestLayer)
           
 boolean redraw(boolean force)
           
 String selectUrl(String paramString, String url)
          Method: selectUrl selectUrl() implements the standard floating-point multiplicative hash function described by Knuth, and hashes the contents of the given param string into a float between 0 and 1.
 void setUrl(String newUrl)
          APIMethod: setUrl Parameters: newUrl - {String}
 
Methods inherited from class org.gwtopenmaps.openlayers.client.layer.Layer
addLayerLoadCancelListener, addLayerLoadEndListener, addLayerLoadStartListener, addLayerVisibilityChangedListener, addOptions, displayInLayerSwitcher, getId, getName, getOpacity, getZIndex, isBaseLayer, isVisible, narrowToLayer, redraw, setDisplayInLayerSwitcher, setIsBaseLayer, setIsVisible, setName, setOpacity, setZIndex
 
Methods inherited from class org.gwtopenmaps.openlayers.client.OpenLayersEObjectWrapper
getListeners, narrowToOpenLayersEObjectWrapper, removeListener
 
Methods inherited from class org.gwtopenmaps.openlayers.client.OpenLayersObjectWrapper
getClassName, getEvents, narrowToOpenLayersObjectWrapper
 
Methods inherited from class org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
getJSObject, setJSObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPRequestLayer

protected HTTPRequestLayer(JSObject httpRequestLayer)

HTTPRequestLayer

public HTTPRequestLayer(String name,
                        String url,
                        WMSParams params,
                        HTTPRequestLayerOptions options)
Constructor: HTTPRequestLayer Parameters: name - {String} url - {String} params - {WMSParams} options - {HTTPRequestLayerOptions} Hashtable of extra options to tag onto the layer


HTTPRequestLayer

public HTTPRequestLayer(String name,
                        String url,
                        WMSParams params)
Constructor: HTTPRequestLayer Parameters: name - {String} url - {String} params - {WMSParams}


HTTPRequestLayer

public HTTPRequestLayer(String name,
                        String[] urls,
                        WMSParams params,
                        HTTPRequestLayerOptions options)
Constructor: HTTPRequestLayer Parameters: name - {String} url - {Array (String)} params - {WMSParams} options - {HTTPRequestLayerOptions} Hashtable of extra options to tag onto the layer


HTTPRequestLayer

public HTTPRequestLayer(String name,
                        String[] urls,
                        WMSParams params)
Constructor: HTTPRequestLayer Parameters: name - {String} url - {Array (String)} params - {WMSParams}

Method Detail

narrowToHTTPRequestLayer

public HTTPRequestLayer narrowToHTTPRequestLayer(JSObject httpRequestLayer)

destroy

public void destroy()
APIMethod: destroy


clone

public HTTPRequestLayer clone(HTTPRequestLayer obj)
APIMethod: clone Parameters: obj - {HTTPRequest} Returns: {HTTPRequest} An exact clone of this HTTPRequest


setUrl

public void setUrl(String newUrl)
APIMethod: setUrl Parameters: newUrl - {String}


mergeNewParams

public boolean mergeNewParams(Params params)
APIMethod: mergeNewParams Parameters: newParams - {Object} Returns: redrawn: {Boolean} whether the layer was actually redrawn.


redraw

public boolean redraw(boolean force)
Parameters:
force - - if true force redraw by adding random parameter to getMap request If force is false or null no random parameters are added, in that case the browser may cache the getMap request, thus not redrawing the map

selectUrl

public String selectUrl(String paramString,
                        String url)
Method: selectUrl selectUrl() implements the standard floating-point multiplicative hash function described by Knuth, and hashes the contents of the given param string into a float between 0 and 1. This float is then scaled to the size of the provided urls array, and used to select a URL. Parameters: paramString - {String} urls - {String} Returns: {String} An entry from the urls array, deterministically selected based on the paramString.


getFullRequestString

public String getFullRequestString(WMSParams newParams,
                                   String altUrl)
Method: getFullRequestString Combine url with layer's params and these newParams. does checking on the serverPath variable, allowing for cases when it is supplied with trailing ? or &, as well as cases where not. return in formatted string like this: "server?key1=value1&key2=value2&key3=value3" WARNING: The altUrl parameter is deprecated and will be removed in 3.0. Parameters: newParams - {WMSParams} altUrl - {String} Use this as the url instead of the layer's url Returns: {String}



Copyright © 2011 sourceforge. All Rights Reserved.