|
||||||||||
| 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 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)
Construct. |
|
GMap(String id,
boolean sensor)
|
|
GMap(String id,
GMapHeaderContributor headerContrib)
Construct. |
|
| 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 |
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 |
|---|
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final WebMarkupContainer map
| Constructor Detail |
|---|
public GMap(String id)
id - wicket id
public GMap(String id,
boolean sensor)
public GMap(String id,
GMapHeaderContributor headerContrib)
id - headerContrib - | Method Detail |
|---|
protected GMap.OverlayListener getOverlayListener()
public String getMapId()
protected void onBeforeRender()
onBeforeRender in class Componentpublic void renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
renderHead in interface IHeaderContributorrenderHead in class 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 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 | |||||||||