Package org.wicketstuff.openlayers
Class AjaxOpenLayersMap
- java.lang.Object
-
- org.apache.wicket.Component
-
- org.apache.wicket.MarkupContainer
-
- org.apache.wicket.markup.html.WebMarkupContainer
-
- org.wicketstuff.openlayers.AjaxOpenLayersMap
-
- All Implemented Interfaces:
Serializable,Iterable<Component>,IEventSink,IEventSource,IFeedbackContributor,IConverterLocator,IMetadataContext<Serializable,Component>,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_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING, RFLAG_CONTAINER_HAS_REMOVALS
-
-
Constructor Summary
Constructors Constructor Description 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
-
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession
-
Methods inherited from class org.apache.wicket.MarkupContainer
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, getRegionMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onComponentTagBody, onDetach, onInitialize, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, stream, streamChildren, toString, toString, visitChildren, visitChildren
-
Methods inherited from class org.apache.wicket.Component
add, addStateChange, beforeRender, canCallListener, canCallListenerAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, 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, getMarkupTag, 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, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderPart, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
onPageRenderHead
public static void onPageRenderHead(IHeaderResponse response, String pathToOpenLayersJS)
-
setExternalControls
public void setExternalControls(boolean externalControls)
- Specified by:
setExternalControlsin interfaceIOpenLayersMap
-
isExternalControls
public boolean isExternalControls()
- Specified by:
isExternalControlsin interfaceIOpenLayersMap
-
setBounds
public void setBounds(Bounds bounds)
- Specified by:
setBoundsin interfaceIOpenLayersMap
-
getBounds
public Bounds getBounds()
- Specified by:
getBoundsin interfaceIOpenLayersMap
-
setCenter
public void setCenter(LonLat center)
- Specified by:
setCenterin interfaceIOpenLayersMap
-
getCenter
public LonLat getCenter()
- Specified by:
getCenterin interfaceIOpenLayersMap
-
setZoom
public void setZoom(Integer zoom)
- Specified by:
setZoomin interfaceIOpenLayersMap
-
getZoom
public Integer getZoom()
- Specified by:
getZoomin interfaceIOpenLayersMap
-
setCenter
public void setCenter(LonLat center, Integer zoom)
- Specified by:
setCenterin interfaceIOpenLayersMap
-
addControl
public IOpenLayersMap addControl(IJavascriptComponent control)
Add a control.- Specified by:
addControlin interfaceIOpenLayersMap- Parameters:
control- control to add- Returns:
- This
-
addOverlay
public IOpenLayersMap addOverlay(Overlay overlay)
Add an overlay.- Specified by:
addOverlayin interfaceIOpenLayersMap- 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:
clearOverlaysin interfaceIOpenLayersMap- 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:
getJSinvokein interfaceIOpenLayersMap- Parameters:
invocation- The JavaScript call to invoke on this AjaxOpenLayersMap.- Returns:
- The generated JavaScript.
-
getJSinvokeNoLineEnd
public String getJSinvokeNoLineEnd(String invocation)
- Specified by:
getJSinvokeNoLineEndin interfaceIOpenLayersMap
-
removeControl
public IOpenLayersMap removeControl(IJavascriptComponent control)
Remove a control.- Specified by:
removeControlin interfaceIOpenLayersMap- Parameters:
control- control to remove- Returns:
- This
-
removeOverlay
public IOpenLayersMap removeOverlay(Overlay overlay)
Remove an overlay.- Specified by:
removeOverlayin interfaceIOpenLayersMap- 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:
updatein interfaceIOpenLayersMap
-
getLayers
public List<Layer> getLayers()
- Specified by:
getLayersin interfaceIOpenLayersMap
-
getControls
public List<IJavascriptComponent> getControls()
- Specified by:
getControlsin interfaceIOpenLayersMap
-
getJSInstance
public String getJSInstance()
- Specified by:
getJSInstancein interfaceIOpenLayersMap
-
getOverlays
public List<Overlay> getOverlays()
- Specified by:
getOverlaysin interfaceIOpenLayersMap
-
setLayers
public void setLayers(List<Layer> layers)
- Specified by:
setLayersin interfaceIOpenLayersMap
-
setOverlays
public void setOverlays(List<Overlay> overlays)
- Specified by:
setOverlaysin interfaceIOpenLayersMap
-
setBusinessLogicProjection
public void setBusinessLogicProjection(String businessLogicProjection)
- Specified by:
setBusinessLogicProjectionin interfaceIOpenLayersMap
-
getBusinessLogicProjection
public String getBusinessLogicProjection()
- Specified by:
getBusinessLogicProjectionin interfaceIOpenLayersMap
-
setMarkersLayerName
public void setMarkersLayerName(String markersLayerName)
-
getMarkersLayerName
public String getMarkersLayerName()
-
setVisibleOnlyLayers
public void setVisibleOnlyLayers(String... names)
-
toggleLayer
public void toggleLayer(String name)
-
-