|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.zk.ui.AbstractComponent org.zkoss.zk.ui.HtmlBasedComponent org.zkoss.zul.impl.XulElement org.zkoss.gmaps.Gmaps
public class Gmaps
The component used to represent <a href="http://www.google.com/apis/maps/">Google Maps</a>
Nested Class Summary | |
---|---|
protected class |
Gmaps.ExtraCtrl
A utility class to implement AbstractComponent.getExtraCtrl() . |
Field Summary |
---|
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
---|
RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH |
Fields inherited from interface org.zkoss.zk.ui.Component |
---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
Constructor Summary | |
---|---|
Gmaps()
|
Method Summary | |
---|---|
java.lang.Object |
clone()
|
void |
closeInfo()
Close the currently opened info window. |
Ginfo |
getInfo()
Returns the currently opened info window of this Google Maps (might be Gmarker or Ginfo). |
MapitemRenderer |
getItemRenderer()
Returns the renderer to render given data object, or null if the default renderer is used. |
double |
getLat()
Returns the current latitude of the Maps center. |
double |
getLng()
Returns the currrent longitude of the Maps center. |
java.lang.String |
getMapType()
Get the current Map Type. |
MapModel |
getModel()
Returns the Maps model associated with this Maps, or null if this Maps is not associated with any Maps data model. |
double |
getNeLat()
Returns the bounded north east latitude. |
double |
getNeLng()
Returns the bounded north east longitude. |
java.lang.String |
getOuterAttrs()
Internal Use Only. |
org.zkoss.zk.ui.Component |
getSelectedItem()
Returns the selected item (can be Gmarker , Gpolyline , or Gpolygon ). |
double |
getSwLat()
Returns the bounded south west latitude. |
double |
getSwLng()
Returns the bounded south west longitude. |
int |
getZoom()
Returns the current zoom level. |
boolean |
insertBefore(org.zkoss.zk.ui.Component child,
org.zkoss.zk.ui.Component insertBefore)
|
boolean |
isContinuousZoom()
Returns whether enable continuous zoom effects, default to false. |
boolean |
isDoubleClickZoom()
Returns whether enable zoom in-out via mouse double click, default to false. |
boolean |
isEnableDragging()
Returns whether enable dragging maps by mouse, default to true. |
boolean |
isEnableGoogleBar()
Returns whether show the Google Search Bar on the Map, default to false. |
boolean |
isHybrid()
Returns whether support hybrid map, default to true. |
boolean |
isNormal()
Returns whether support normal map, default to true. |
boolean |
isPhysical()
Returns whether support physical map, default to false. |
boolean |
isSatellite()
Returns whether support satellite map, default to true. |
boolean |
isScrollWheelZoom()
Returns whether enable zoom in-out via mouse scroll wheel, default to false. |
boolean |
isShowLargeCtrl()
Returns whether show the large Google Maps Control. |
boolean |
isShowOverviewCtrl()
Returns whether show the Google Maps overview Control, default to false. |
boolean |
isShowScaleCtrl()
Returns whether show the Google Maps scale Control, default to false. |
boolean |
isShowSmallCtrl()
Returns whether show the large Google Maps Control. |
boolean |
isShowTypeCtrl()
Returns whether show the Google Maps type Control. |
boolean |
isShowZoomCtrl()
Returns whether show the small zoom Google Maps Control. |
protected java.lang.Object |
newExtraCtrl()
|
void |
onChildRemoved(org.zkoss.zk.ui.Component child)
|
void |
openInfo(Ginfo info)
Open the specified Ginfo or Gmarker. |
void |
panTo(double lat,
double lng)
Pan to the new center of the Google Maps. |
void |
setCenter(double lat,
double lng)
Sets the center of the Google Maps. |
void |
setContinuousZoom(boolean b)
Sets whether enable continuous zoom effects, default to false. |
void |
setDoubleClickZoom(boolean b)
Sets whether enable zoom in-out via mouse double click, default to false. |
void |
setEnableDragging(boolean b)
Sets whether enable dragging maps by mouse, default to true. |
void |
setEnableGoogleBar(boolean b)
Sets whether show the Google Search Bar on the Map, default to false. |
void |
setHybrid(boolean b)
Sets whether support hybrid map, default to true. |
void |
setItemRenderer(MapitemRenderer renderer)
Sets the renderer which is used to render each Mapitem if
getModel() is not null. |
void |
setLat(double lat)
Sets the current latitude of the Maps center. |
void |
setLng(double lng)
Sets the current longitude of the Maps center. |
void |
setMapType(java.lang.String mapType)
Set the map type (normal, satellite, hybrid, physical), default is normal. |
void |
setModel(MapModel model)
Sets the model associated with this Maps. |
void |
setNormal(boolean b)
Sets whether support normal map, default to true. |
void |
setPhysical(boolean b)
Sets whether support physical map, default to false. |
void |
setSatellite(boolean b)
Sets whether support satellite map, default to true. |
void |
setScrollWheelZoom(boolean b)
Sets whether enable zoom in-out via mouse scroll wheel, default to false. |
void |
setSelectedItem(org.zkoss.zk.ui.Component item)
Set the selected item (can be Gmarker , Gpolyline , or Gpolygon ). |
void |
setShowLargeCtrl(boolean b)
Sets whether show the large Google Maps Control. |
void |
setShowOverviewCtrl(boolean b)
Sets whether show the Google Maps overview Control, default to false. |
void |
setShowScaleCtrl(boolean b)
Sets whether show the Google Maps scale Control. |
void |
setShowSmallCtrl(boolean b)
Sets whether show the small Google Maps Control. |
void |
setShowTypeCtrl(boolean b)
Sets whether show the Google Maps type Control. |
void |
setShowZoomCtrl(boolean b)
Sets whether show the small zoom Google Maps Control. |
void |
setZoom(int zoom)
Sets zoom level. |
Methods inherited from class org.zkoss.zul.impl.XulElement |
---|
getAction, getActionAttrs, getAllOnClickAttrs, getContext, getInnerAttrs, getPopup, getTooltip, setAction, setContext, setPopup, setTooltip |
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
---|
focus, getDraggable, getDroppable, getHeight, getLeft, getRealSclass, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZIndex, setClass, setDraggable, setDroppable, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZIndex |
Methods inherited from class org.zkoss.zk.ui.AbstractComponent |
---|
addAnnotation, addAnnotation, addEventHandler, addEventListener, addForward, addForward, addMoved, addSharedAnnotationMap, addSharedEventHandlerMap, appendAsapAttr, appendChild, applyProperties, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getEventHandler, getExtraCtrl, getFellow, getFellowIfAny, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getMoldURI, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getPropagatee, getRoot, getSpaceOwner, getUuid, getVariable, invalidate, isAsapRequired, isChildable, isListenerAvailable, isVisible, onChildAdded, onDrawNewChild, onPageAttached, onPageDetached, onWrongValue, redraw, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setPageBefore, setParent, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, smartUpdateDeferred, toString, unsetVariable |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Gmaps()
Method Detail |
---|
public void setCenter(double lat, double lng)
lat
- latitude of the Google Maps centerlng
- longitude of the Google Maps centerpublic void setLat(double lat)
lat
- latitude of the Google Maps centerpublic double getLat()
public void setLng(double lng)
lng
- the current longitude of the Maps center.public double getLng()
public double getSwLat()
public double getSwLng()
public double getNeLat()
public double getNeLng()
public void panTo(double lat, double lng)
lat
- latitude of the Google Maps centerlng
- longitude of the Google Maps centerpublic void setZoom(int zoom)
zoom
- the zoom level (0-18)public int getZoom()
public void setShowLargeCtrl(boolean b)
b
- true to show the large Google Maps Control.public boolean isShowLargeCtrl()
public void setShowSmallCtrl(boolean b)
b
- true to show the small Google Maps Control.public boolean isShowSmallCtrl()
public void setShowZoomCtrl(boolean b)
b
- true to show the small zoom Google Maps Control.public boolean isShowZoomCtrl()
public void setShowTypeCtrl(boolean b)
b
- true to show the Google Maps type Control.public boolean isShowTypeCtrl()
public void setShowScaleCtrl(boolean b)
b
- true to show the Google Maps scale Control.public boolean isShowScaleCtrl()
public void setShowOverviewCtrl(boolean b)
b
- whether show the Google Maps overview Control.public boolean isShowOverviewCtrl()
public void setNormal(boolean b)
b
- whether support normal map, default to true.public boolean isNormal()
public void setSatellite(boolean b)
b
- whether support satellite map, default to true.public boolean isSatellite()
public void setHybrid(boolean b)
b
- whether support hybrid map, default to true.public boolean isHybrid()
public void setPhysical(boolean b)
b
- whether support physical map, default to false.public boolean isPhysical()
public java.lang.String getMapType()
public void setMapType(java.lang.String mapType)
mapType
- (normal, satellite, hybrid, physical), default is normal.public void setEnableDragging(boolean b)
b
- true to enable dragging maps by mouse.public boolean isEnableDragging()
public void setContinuousZoom(boolean b)
b
- true to enable continuous zoom effects.public boolean isContinuousZoom()
public void setDoubleClickZoom(boolean b)
b
- true to enable zoom in-out via mouse double clilck.public boolean isDoubleClickZoom()
public void setScrollWheelZoom(boolean b)
b
- true to enable zoom in-out via mouse scroll wheel.public boolean isScrollWheelZoom()
public void setEnableGoogleBar(boolean b)
b
- true to show the Google Search Barpublic boolean isEnableGoogleBar()
public void openInfo(Ginfo info)
info
- the specified Ginfo or Gmarker.public void closeInfo()
public Ginfo getInfo()
public MapModel getModel()
public void setModel(MapModel model)
model
- the model to associated, or null to dis-associate any
privious model.public MapitemRenderer getItemRenderer()
Mapitem
.
public void setItemRenderer(MapitemRenderer renderer)
Mapitem
if
getModel()
is not null.
Note: changing a renderer will not cause the Maps to re-render. If
you want it to re-render, you could assign the same model again(i.e.,
setModel(getModel()) ) or fire an MapDataEvent
event.
renderer
- the renderer, or null to use the default.public void setSelectedItem(org.zkoss.zk.ui.Component item)
Gmarker
, Gpolyline
, or Gpolygon
).
item
- the item to be selected.public org.zkoss.zk.ui.Component getSelectedItem()
Gmarker
, Gpolyline
, or Gpolygon
).
public java.lang.String getOuterAttrs()
Used only for component development, not for application developers.
getOuterAttrs
in class org.zkoss.zul.impl.XulElement
public boolean insertBefore(org.zkoss.zk.ui.Component child, org.zkoss.zk.ui.Component insertBefore)
insertBefore
in interface org.zkoss.zk.ui.Component
insertBefore
in class org.zkoss.zk.ui.AbstractComponent
public void onChildRemoved(org.zkoss.zk.ui.Component child)
onChildRemoved
in interface org.zkoss.zk.ui.Component
onChildRemoved
in class org.zkoss.zk.ui.AbstractComponent
public java.lang.Object clone()
clone
in interface org.zkoss.zk.ui.Component
clone
in class org.zkoss.zk.ui.AbstractComponent
protected java.lang.Object newExtraCtrl()
newExtraCtrl
in class org.zkoss.zk.ui.HtmlBasedComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |