|
||||||||||
| 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
wicket.contrib.gmap.GMap2
public class GMap2
Wicket component to embed Google Maps into your pages.
The Google Maps API requires an API key to use it. You will need to generate one for each deployment context you have. See the Google Maps API sign up page for more information.
| Nested Class Summary | |
|---|---|
class |
GMap2.OverlayListener
|
class |
GMap2.PanDirectionBehavior
|
class |
GMap2.SetCenterBehavior
|
class |
GMap2.SetMapTypeBehavior
|
class |
GMap2.SetZoomBehavior
|
class |
GMap2.ZoomInBehavior
|
class |
GMap2.ZoomOutBehavior
|
| Field Summary |
|---|
| 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 | |
|---|---|
GMap2(String id,
GMapHeaderContributor headerContrib)
Construct. |
|
GMap2(String id,
GMapHeaderContributor headerContrib,
List<GOverlay> overlays)
Deprecated. The usage is discouraged. Use this(String, String) instead and add the overlays later on. |
|
GMap2(String id,
String gMapKey)
Construct. |
|
GMap2(String id,
String gMapKey,
List<GOverlay> overlays)
Deprecated. The usage is discouraged. Use this(String, String) instead and add the overlays later on. |
|
| Method Summary | |
|---|---|
GMap2 |
addControl(GControl control)
Add a control. |
GMap2 |
addOverlay(GOverlay overlay)
Add an overlay. |
void |
enableGoogleBar(boolean enabled)
|
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()
|
Set<GControl> |
getControls()
|
GInfoWindow |
getInfoWindow()
|
String |
getJSinvoke(String invocation)
Convenience method for generating a JavaScript call on this GMap2 with the given invocation. |
GMapType |
getMapType()
|
List<GOverlay> |
getOverlays()
|
int |
getZoom()
|
boolean |
isDoubleClickZoomEnabled()
|
boolean |
isDraggingEnabled()
|
boolean |
isScrollWheelZoomEnabled()
|
protected void |
onBeforeRender()
|
void |
panTo(GLatLng center)
Changes the center point of the map to the given point. |
GMap2 |
removeAllOverlays()
Clear all overlays. |
GMap2 |
removeControl(GControl control)
Remove a control. |
GMap2 |
removeOverlay(GOverlay overlay)
Remove an overlay. |
void |
renderHead(IHeaderResponse response)
|
void |
setCenter(GLatLng center)
Set the center. |
void |
setDoubleClickZoomEnabled(boolean enabled)
|
void |
setDraggingEnabled(boolean enabled)
|
void |
setMapType(GMapType mapType)
|
void |
setOverlays(List<GOverlay> overlays)
|
void |
setScrollWheelZoomEnabled(boolean enabled)
|
void |
setZoom(int level)
|
void |
update(AjaxRequestTarget target)
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 |
| Methods inherited from class org.apache.wicket.MarkupContainer |
|---|
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, hasAssociatedMarkup, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onMarkupAttached, 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 |
| Constructor Detail |
|---|
public GMap2(String id,
String gMapKey)
id - gMapKey - Google gmap API KEY
@Deprecated
public GMap2(String id,
String gMapKey,
List<GOverlay> overlays)
id - gMapKey - Google gmap API KEYoverlays -
public GMap2(String id,
GMapHeaderContributor headerContrib)
id - headerContrib -
@Deprecated
public GMap2(String id,
GMapHeaderContributor headerContrib,
List<GOverlay> overlays)
id - headerContrib - overlays - | Method Detail |
|---|
public void renderHead(IHeaderResponse response)
renderHead in interface IHeaderContributorrenderHead in class ComponentComponent.renderHead(org.apache.wicket.markup.html.IHeaderResponse)protected void onBeforeRender()
onBeforeRender in class ComponentComponent.onBeforeRender()public GMap2 addControl(GControl control)
control - control to add
public GMap2 removeControl(GControl control)
control - control to remove
public GMap2 addOverlay(GOverlay overlay)
addOverlay in interface GOverlayContaineroverlay - overlay to add
public GMap2 removeOverlay(GOverlay overlay)
removeOverlay in interface GOverlayContaineroverlay - overlay to remove
public GMap2 removeAllOverlays()
removeAllOverlays in interface GOverlayContainerpublic List<GOverlay> getOverlays()
getOverlays in interface GOverlayContainerpublic Set<GControl> getControls()
public GLatLng getCenter()
public GLatLngBounds getBounds()
public void enableGoogleBar(boolean enabled)
public void setDraggingEnabled(boolean enabled)
public boolean isDraggingEnabled()
public void setDoubleClickZoomEnabled(boolean enabled)
public boolean isDoubleClickZoomEnabled()
public void setScrollWheelZoomEnabled(boolean enabled)
public boolean isScrollWheelZoomEnabled()
public GMapType getMapType()
public void setMapType(GMapType mapType)
public int getZoom()
public void setZoom(int level)
public void setCenter(GLatLng center)
center - center to setpublic void panTo(GLatLng center)
center - the new center of the mappublic GInfoWindow getInfoWindow()
public String getJSinvoke(String invocation)
invocation - The JavaScript call to invoke on this GMap2.
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(AjaxRequestTarget target)
public void setOverlays(List<GOverlay> overlays)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||