|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.panel.Panel
org.wicketstuff.gmap.GMap
public class GMap
Wicket component to embed Google Maps into your pages.
| Nested Class Summary | |
|---|---|
class |
GMap.OverlayListener
|
class |
GMap.PanDirectionBehavior
|
class |
GMap.SetCenterBehavior
|
class |
GMap.SetMapTypeBehavior
|
class |
GMap.SetZoomBehavior
|
class |
GMap.ZoomInBehavior
|
class |
GMap.ZoomOutBehavior
|
| Field Summary | |
|---|---|
protected org.apache.wicket.markup.html.WebMarkupContainer |
map
|
| Fields inherited from class org.apache.wicket.markup.html.panel.Panel |
|---|
PANEL |
| 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 | |
|---|---|
GMap(String id)
Deprecated. since 22th June 2016 Google Maps requires an API-key, therefore you should use GMap(java.lang.String, java.lang.String) or GMap(java.lang.String, java.lang.String, java.lang.String)
instead of this constructor |
|
GMap(String id,
boolean sensor)
Deprecated. Since the sensor-parameter is no longer required from Google GMap(java.lang.String, java.lang.String) or GMap(java.lang.String, java.lang.String, java.lang.String)
instead of this constructor |
|
GMap(String id,
GMapHeaderContributor headerContrib)
Construct. |
|
GMap(String id,
String apiKey)
Constructor. |
|
GMap(String id,
String apiKey,
String scheme)
Constructor. |
|
| Method Summary | |
|---|---|
GMap |
addOverlay(GOverlay overlay)
Add an overlay. |
void |
fitMarkers(List<GLatLng> markersToShow)
|
void |
fitMarkers(List<GLatLng> markersToShow,
boolean showMarkersForPoints)
|
void |
fitMarkers(List<GLatLng> markersToShow,
boolean showMarkersForPoints,
double zoomAdjustment)
Makes the map zoom out and centre around all the GLatLng points in markersToShow. |
GLatLngBounds |
getBounds()
|
GLatLng |
getCenter()
|
String |
getJSinit()
Generates the JavaScript used to instantiate this GMap3 as an JavaScript class on the client side. |
String |
getJSinvoke(String invocation)
Convenience method for generating a JavaScript call on this GMap with the given invocation. |
String |
getJsReference()
Build a reference in JS-Scope. |
String |
getMapId()
|
GMapType |
getMapType()
|
int |
getMaxZoom()
|
int |
getMinZoom()
|
protected GMap.OverlayListener |
getOverlayListener()
|
List<GOverlay> |
getOverlays()
|
CharSequence |
getTriggerEventScript(String event)
Returns the script for triggering an event on map. |
CharSequence |
getTriggerResizeScript()
|
int |
getZoom()
|
boolean |
isDoubleClickZoomEnabled()
Is the function zooming-by-doubleclick enabled? Disabled by default. |
boolean |
isDraggingEnabled()
Is dragging allowed? Enabled by default. |
boolean |
isFailSilently()
|
boolean |
isMapTypeControlEnabled()
Is the map type control enabled? Enabled by default. |
boolean |
isMarkerClusterEnabled()
|
boolean |
isPanControlEnabled()
Is the pan control enabled? Enabled by default. |
boolean |
isScaleControlEnabled()
Is the scale control enabled? Disabled by default. |
boolean |
isScrollWheelZoomEnabled()
Is the function zooming-by-mousewheel enabled? Disabled by default. |
boolean |
isStreetViewControlEnabled()
Is the StreetView control enabled? Disabled by default. |
boolean |
isZoomControlEnabled()
Is the zoom control enabled? Enabled by default. |
protected void |
onBeforeRender()
|
void |
panTo(GLatLng center)
Changes the center point of the map to the given point. |
GMap |
removeAllOverlays()
Clear all overlays. |
GMap |
removeOverlay(GOverlay overlay)
Remove an overlay. |
void |
renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
|
void |
setBounds(GLatLngBounds bounds)
|
void |
setCenter(GLatLng center)
Set the center. |
void |
setDoubleClickZoomEnabled(boolean enabled)
Sets if zooming-by-doubleclicking should be allowed or not. |
void |
setDraggingEnabled(boolean enabled)
Sets if dragging should be allowed or not. |
void |
setFailSilently(boolean failSilently)
|
void |
setMapType(GMapType mapType)
Sets the map type which should be used. |
void |
setMapTypeControlEnabled(boolean enabled)
Sets if the map type control should be visible or not. |
void |
setMarkerCluster(GMarkerCluster markerCluster)
|
void |
setMaxZoom(int level)
Sets a new maxZoom limit. |
void |
setMinZoom(int level)
Sets a new minZoom limit. |
void |
setOverlays(List<GOverlay> overlays)
|
void |
setPanControlEnabled(boolean enabled)
Sets if the pan control should be visible or not. |
void |
setScaleControlEnabled(boolean enabled)
Sets if the scale control should be visible or not. |
void |
setScrollWheelZoomEnabled(boolean enabled)
Sets if zooming-by-mousewheel should be allowed or not. |
void |
setStreetViewControlEnabled(boolean enabled)
Sets if the StreeView control should be visible or not. |
void |
setZoom(int level)
Sets a new zoom level. |
void |
setZoomControlEnabled(boolean enabled)
Sets if the zoom control should be visible or not. |
void |
update()
Update state from a request to an AJAX target. |
| Methods inherited from class org.apache.wicket.markup.html.panel.Panel |
|---|
newMarkupSourcingStrategy |
| Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
|---|
getWebApplication, 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, clearOriginalDestination, 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, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onComponentTag, onConfigure, onDetach, onEvent, onInitialize, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, 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 |
| Field Detail |
|---|
protected final org.apache.wicket.markup.html.WebMarkupContainer map
| Constructor Detail |
|---|
public GMap(String id,
String apiKey)
id - wicket idapiKey - your Google API key
public GMap(String id,
String apiKey,
String scheme)
id - wicket idscheme - the scheme ("http" or "https") which should be usedapiKey - your Google API keypublic GMap(String id)
GMap(java.lang.String, java.lang.String) or GMap(java.lang.String, java.lang.String, java.lang.String)
instead of this constructor
id - wicket idhttp://googlegeodevelopers.blogspot.de/2016/06/building-for-scale-updates-to-google.html
public GMap(String id,
boolean sensor)
GMap(java.lang.String, java.lang.String) or GMap(java.lang.String, java.lang.String, java.lang.String)
instead of this constructor
public GMap(String id,
GMapHeaderContributor headerContrib)
id - headerContrib - | Method Detail |
|---|
protected GMap.OverlayListener getOverlayListener()
public String getMapId()
protected void onBeforeRender()
onBeforeRender in class org.apache.wicket.Componentpublic void renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
renderHead in interface org.apache.wicket.markup.html.IHeaderContributorrenderHead in class org.apache.wicket.Componentpublic GMap addOverlay(GOverlay overlay)
addOverlay in interface GOverlayContaineroverlay - overlay to add
GOverlayContainer.addOverlay(GOverlay)public GMap removeOverlay(GOverlay overlay)
removeOverlay in interface GOverlayContaineroverlay - overlay to remove
GOverlayContainer.removeOverlay(GOverlay)public GMap removeAllOverlays()
removeAllOverlays in interface GOverlayContainerGOverlayContainer.removeAllOverlays()public List<GOverlay> getOverlays()
getOverlays in interface GOverlayContainerGOverlayContainer.getOverlays()public GLatLngBounds getBounds()
public void setBounds(GLatLngBounds bounds)
public CharSequence getTriggerEventScript(String event)
event -
public CharSequence getTriggerResizeScript()
public void setDraggingEnabled(boolean enabled)
enabled - true if dragging should be allowed, false otherwisepublic boolean isDraggingEnabled()
public void setDoubleClickZoomEnabled(boolean enabled)
enabled - true if zooming-by-doubleclicking should be allowed, false otherwisepublic boolean isDoubleClickZoomEnabled()
public void setScrollWheelZoomEnabled(boolean enabled)
enabled - true if zooming-by-mousewheel should be allowed, false otherwisepublic boolean isScrollWheelZoomEnabled()
public boolean isStreetViewControlEnabled()
public void setStreetViewControlEnabled(boolean enabled)
enabled - true if StreetView should be allowed, false otherwisepublic boolean isZoomControlEnabled()
public void setZoomControlEnabled(boolean enabled)
enabled - true if the zoom-control should be enabled, false otherwisepublic boolean isMapTypeControlEnabled()
public void setMapTypeControlEnabled(boolean enabled)
enabled - true if you want the user to have the possibility to
change the map type, false otherwisepublic boolean isScaleControlEnabled()
public void setScaleControlEnabled(boolean enabled)
enabled - true if the scale-control should be enabled, false otherwisepublic boolean isPanControlEnabled()
public void setPanControlEnabled(boolean enabled)
enabled - true if the pan-control should be enabled, false otherwisepublic GMapType getMapType()
GMapTypepublic void setMapType(GMapType mapType)
mapType - the map typeGMapTypepublic int getZoom()
public int getMinZoom()
public int getMaxZoom()
public void setZoom(int level)
level - the new zoom levelpublic void setMinZoom(int level)
level - the new minZoom levelpublic void setMaxZoom(int level)
level - the new maxZoom levelpublic GLatLng getCenter()
public void setCenter(GLatLng center)
center - center to setpublic void panTo(GLatLng center)
center - the new center of the mappublic void setMarkerCluster(GMarkerCluster markerCluster)
public boolean isMarkerClusterEnabled()
public String getJSinit()
public String getJSinvoke(String invocation)
invocation - The JavaScript call to invoke on this GMap.
public String getJsReference()
public void fitMarkers(List<GLatLng> markersToShow)
fitMarkers(List, boolean, double)
public void fitMarkers(List<GLatLng> markersToShow,
boolean showMarkersForPoints)
fitMarkers(List, boolean, double)
public void fitMarkers(List<GLatLng> markersToShow,
boolean showMarkersForPoints,
double zoomAdjustment)
Makes the map zoom out and centre around all the GLatLng points in markersToShow.
Big ups to Doug Leeper for the code.
markersToShow - the points to centre around.showMarkersForPoints - if true, will also add basic markers to the map for each point focused on. Just a simple convenience
method - you will probably want to turn this off so that you can show more information with each
marker when clicked etc.public void update()
public void setOverlays(List<GOverlay> overlays)
public boolean isFailSilently()
public void setFailSilently(boolean failSilently)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||