org.wicketstuff.openlayers
Class AjaxOpenLayersMap

java.lang.Object
  extended by org.apache.wicket.Component
      extended by org.apache.wicket.MarkupContainer
          extended by org.apache.wicket.markup.html.WebMarkupContainer
              extended by org.wicketstuff.openlayers.AjaxOpenLayersMap
All Implemented Interfaces:
Serializable, Iterable<Component>, IEventSink, IEventSource, IConverterLocator, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, IClusterable, IOpenLayersMap

public class AjaxOpenLayersMap
extends WebMarkupContainer
implements IOpenLayersMap

Author:
Marin Mandradjiev (marinsm@hotmail.com)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER
 
Constructor Summary
AjaxOpenLayersMap(String id, List<Layer> layers)
           
AjaxOpenLayersMap(String id, List<Layer> layers, HashMap<String,String> options)
           
AjaxOpenLayersMap(String id, List<Layer> layers, HashMap<String,String> options, List<Feature> features)
           
AjaxOpenLayersMap(String id, List<Layer> layers, HashMap<String,String> options, List<Feature> features, List<FeatureStyle> featureStyles)
           
 
Method Summary
 IOpenLayersMap addControl(IJavascriptComponent control)
          Add a control.
 IOpenLayersMap addFeature(Feature feature)
          Add a feature.
 IOpenLayersMap addFeatureStyle(FeatureStyle featureStyle)
          Add a feature style.
 IOpenLayersMap addLayer(Layer layer)
          Add a layer.
 IOpenLayersMap addOverlay(Overlay overlay)
          Add an overlay.
 IOpenLayersMap clearOverlays()
          Clear all overlays.
 Bounds getBounds()
           
 String getBusinessLogicProjection()
           
 LonLat getCenter()
           
 List<IJavascriptComponent> getControls()
           
 Vector getFeatureVector(String name)
           
protected  String getJSinit()
          Generates the JavaScript used to instantiate this AjaxOpenLayersMap as an JavaScript class on the client side.
 String getJSInstance()
           
 String getJSinvoke(String invocation)
          Convenience method for generating a JavaScript call on this AjaxOpenLayersMap with the given invocation.
 String getJSinvokeNoLineEnd(String invocation)
           
 List<Layer> getLayers()
           
 String getMarkersLayerName()
           
 List<Overlay> getOverlays()
           
 Integer getZoom()
           
 boolean isExternalControls()
           
static void onPageRenderHead(org.apache.wicket.markup.head.IHeaderResponse response, String pathToOpenLayersJS)
           
 IOpenLayersMap removeControl(IJavascriptComponent control)
          Remove a control.
 IOpenLayersMap removeFeature(Feature feature)
          Remove an feature.
 IOpenLayersMap removeFeatureStyle(FeatureStyle featureStyle)
           
 IOpenLayersMap removeOverlay(Overlay overlay)
          Remove an overlay.
 void setBounds(Bounds bounds)
           
 void setBusinessLogicProjection(String businessLogicProjection)
           
 void setCenter(LonLat center)
           
 void setCenter(LonLat center, Integer zoom)
           
 void setExternalControls(boolean externalControls)
           
 void setLayers(List<Layer> layers)
           
 void setMarkersLayerName(String markersLayerName)
           
 void setOverlays(List<Overlay> overlays)
           
 void setVisibleOnlyLayers(String... names)
           
 void setZoom(Integer zoom)
           
 void toggleLayer(String name)
           
 void update(AjaxRequestTarget target)
          Update state from a request to an AJAX target.
 
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebPage, getWebRequest, getWebResponse, getWebSession
 
Methods inherited from class org.apache.wicket.MarkupContainer
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren
 
Methods inherited from class org.apache.wicket.Component
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onDetach, onEvent, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AjaxOpenLayersMap

public AjaxOpenLayersMap(String id,
                         List<Layer> layers)

AjaxOpenLayersMap

public AjaxOpenLayersMap(String id,
                         List<Layer> layers,
                         HashMap<String,String> options)

AjaxOpenLayersMap

public AjaxOpenLayersMap(String id,
                         List<Layer> layers,
                         HashMap<String,String> options,
                         List<Feature> features)

AjaxOpenLayersMap

public AjaxOpenLayersMap(String id,
                         List<Layer> layers,
                         HashMap<String,String> options,
                         List<Feature> features,
                         List<FeatureStyle> featureStyles)
Method Detail

onPageRenderHead

public static void onPageRenderHead(org.apache.wicket.markup.head.IHeaderResponse response,
                                    String pathToOpenLayersJS)

setExternalControls

public void setExternalControls(boolean externalControls)
Specified by:
setExternalControls in interface IOpenLayersMap

isExternalControls

public boolean isExternalControls()
Specified by:
isExternalControls in interface IOpenLayersMap

setBounds

public void setBounds(Bounds bounds)
Specified by:
setBounds in interface IOpenLayersMap

getBounds

public Bounds getBounds()
Specified by:
getBounds in interface IOpenLayersMap

setCenter

public void setCenter(LonLat center)
Specified by:
setCenter in interface IOpenLayersMap

getCenter

public LonLat getCenter()
Specified by:
getCenter in interface IOpenLayersMap

setZoom

public void setZoom(Integer zoom)
Specified by:
setZoom in interface IOpenLayersMap

getZoom

public Integer getZoom()
Specified by:
getZoom in interface IOpenLayersMap

setCenter

public void setCenter(LonLat center,
                      Integer zoom)
Specified by:
setCenter in interface IOpenLayersMap

addControl

public IOpenLayersMap addControl(IJavascriptComponent control)
Add a control.

Specified by:
addControl in interface IOpenLayersMap
Parameters:
control - control to add
Returns:
This

addOverlay

public IOpenLayersMap addOverlay(Overlay overlay)
Add an overlay.

Specified by:
addOverlay in interface IOpenLayersMap
Parameters:
overlay - overlay to add
Returns:
This

addLayer

public IOpenLayersMap addLayer(Layer layer)
Add a layer.

Parameters:
layer - layer to add
Returns:
This

addFeature

public IOpenLayersMap addFeature(Feature feature)
Add a feature.

Parameters:
feature - feature to add
Returns:
This

addFeatureStyle

public IOpenLayersMap addFeatureStyle(FeatureStyle featureStyle)
Add a feature style.

Parameters:
featureStyle - featureStyle to add
Returns:
This

removeFeatureStyle

public IOpenLayersMap removeFeatureStyle(FeatureStyle featureStyle)

clearOverlays

public IOpenLayersMap clearOverlays()
Clear all overlays.

Specified by:
clearOverlays in interface IOpenLayersMap
Returns:
This

getJSinit

protected String getJSinit()
Generates the JavaScript used to instantiate this AjaxOpenLayersMap as an JavaScript class on the client side.

Returns:
The generated JavaScript

getJSinvoke

public String getJSinvoke(String invocation)
Convenience method for generating a JavaScript call on this AjaxOpenLayersMap with the given invocation.

Specified by:
getJSinvoke in interface IOpenLayersMap
Parameters:
invocation - The JavaScript call to invoke on this AjaxOpenLayersMap.
Returns:
The generated JavaScript.

getJSinvokeNoLineEnd

public String getJSinvokeNoLineEnd(String invocation)
Specified by:
getJSinvokeNoLineEnd in interface IOpenLayersMap

removeControl

public IOpenLayersMap removeControl(IJavascriptComponent control)
Remove a control.

Specified by:
removeControl in interface IOpenLayersMap
Parameters:
control - control to remove
Returns:
This

removeOverlay

public IOpenLayersMap removeOverlay(Overlay overlay)
Remove an overlay.

Specified by:
removeOverlay in interface IOpenLayersMap
Parameters:
overlay - overlay to remove
Returns:
This

removeFeature

public IOpenLayersMap removeFeature(Feature feature)
Remove an feature.

Parameters:
feature - feature to remove
Returns:
This

update

public void update(AjaxRequestTarget target)
Update state from a request to an AJAX target.

Specified by:
update in interface IOpenLayersMap

getLayers

public List<Layer> getLayers()
Specified by:
getLayers in interface IOpenLayersMap

getControls

public List<IJavascriptComponent> getControls()
Specified by:
getControls in interface IOpenLayersMap

getJSInstance

public String getJSInstance()
Specified by:
getJSInstance in interface IOpenLayersMap

getOverlays

public List<Overlay> getOverlays()
Specified by:
getOverlays in interface IOpenLayersMap

setLayers

public void setLayers(List<Layer> layers)
Specified by:
setLayers in interface IOpenLayersMap

setOverlays

public void setOverlays(List<Overlay> overlays)
Specified by:
setOverlays in interface IOpenLayersMap

setBusinessLogicProjection

public void setBusinessLogicProjection(String businessLogicProjection)
Specified by:
setBusinessLogicProjection in interface IOpenLayersMap

getBusinessLogicProjection

public String getBusinessLogicProjection()
Specified by:
getBusinessLogicProjection in interface IOpenLayersMap

getFeatureVector

public Vector getFeatureVector(String name)

setMarkersLayerName

public void setMarkersLayerName(String markersLayerName)

getMarkersLayerName

public String getMarkersLayerName()

setVisibleOnlyLayers

public void setVisibleOnlyLayers(String... names)

toggleLayer

public void toggleLayer(String name)


Copyright © 2008-2012. All Rights Reserved.