类 WebMapLayer
- java.lang.Object
-
- org.meteoinfo.layer.MapLayer
-
- org.meteoinfo.layer.WebMapLayer
-
- 所有已实现的接口:
java.lang.Cloneable
public class WebMapLayer extends MapLayer
- 作者:
- wyq
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classWebMapLayer.LanguageEditorclassWebMapLayer.WebMapLayerBeanstatic classWebMapLayer.WebMapLayerBeanBeanInfostatic classWebMapLayer.WebMapProviderEditor
-
构造器概要
构造器 构造器 说明 WebMapLayer()Constructor
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 java.awt.RectanglecalculateViewportBounds(java.awt.Graphics2D g, int width, int height)Calculate view port boundsvoiddrawMapTiles(java.awt.Graphics2D g, int zoom, int width, int height)Draw the map tilesvoiddrawMapTiles(java.awt.Graphics2D g, int zoom, java.awt.Rectangle viewportBounds)Draw the map tiles.voiddrawWebMapLayer(java.awt.Graphics2D g, int width, int height, TileLoadListener tll)Draw layerGeoPositiongetAddressLocation()java.awt.geom.Point2DgetCenter()Gets the current pixel center of the map.GeoPositiongetCenterPosition()A property indicating the center position of the mapjava.lang.StringgetLayerInfo()To stringjava.awt.ImagegetLoadingImage()A property for an image which will be display when an image is still loading.TileFactorygetTileFactory()Get the current factoryWebMapProvidergetWebMapProvider()Get web map providerdoublegetWebMapScale()Get web map scaleintgetZoom()Gets the current zoom levelbooleanisDrawTileBorders()Indicates if the tile borders should be drawn.booleanisRestrictOutsidePanning()booleanisTileOnMap(int x, int y, java.awt.Dimension mapSize)voidrepaint()RepaintvoidsetAddressLocation(GeoPosition pos)voidsetAddressLocation(GeoPosition pos, int zoom)voidsetCenter(java.awt.geom.Point2D center)Sets the new center of the map in pixel coordinates.voidsetCenterPosition(GeoPosition geoPosition)A property indicating the center position of the mapvoidsetDrawTileBorders(boolean drawTileBorders)Set if the tile borders should be drawn.voidsetLoadingImage(java.awt.Image loadingImage)A property for an image which will be display when an image is still loading.voidsetRestrictOutsidePanning(boolean restrictOutsidePanning)voidsetTileFactory(TileFactory factory)Set the current tile factoryvoidsetWebMapProvider(WebMapProvider prov)Set web map providervoidsetWebMapScale(double value)Set web map scalevoidsetZoom(int zoom)Set the current zoom level-
从类继承的方法 org.meteoinfo.layer.MapLayer
clone, getExtent, getFileName, getHandle, getLayerDrawType, getLayerName, getLayerType, getLegendScheme, getProjInfo, getShapeType, getTag, getTransparency, getVisibleScale, hasLegendScheme, isExpanded, isMaskout, isVisible, saveFile, saveFile, setExpanded, setExtent, setFileName, setHandle, setLayerDrawType, setLayerName, setLayerType, setLegendScheme, setMaskout, setProjInfo, setShapeType, setTag, setTransparency, setVisible, setVisibleScale, toString
-
-
-
-
方法详细资料
-
getZoom
public int getZoom()
Gets the current zoom level- 返回:
- the current zoom level
-
setZoom
public void setZoom(int zoom)
Set the current zoom level- 参数:
zoom- the new zoom level
-
getCenter
public java.awt.geom.Point2D getCenter()
Gets the current pixel center of the map. This point is in the global bitmap coordinate system, not as lat/longs.- 返回:
- the current center of the map as a pixel value
-
isRestrictOutsidePanning
public boolean isRestrictOutsidePanning()
-
setRestrictOutsidePanning
public void setRestrictOutsidePanning(boolean restrictOutsidePanning)
-
setCenter
public void setCenter(java.awt.geom.Point2D center)
Sets the new center of the map in pixel coordinates.- 参数:
center- the new center of the map in pixel coordinates
-
setCenterPosition
public void setCenterPosition(GeoPosition geoPosition)
A property indicating the center position of the map- 参数:
geoPosition- the new property value
-
getCenterPosition
public GeoPosition getCenterPosition()
A property indicating the center position of the map- 返回:
- the current center position
-
getTileFactory
public TileFactory getTileFactory()
Get the current factory- 返回:
- the current property value
-
setTileFactory
public void setTileFactory(TileFactory factory)
Set the current tile factory- 参数:
factory- the new property value
-
getWebMapScale
public double getWebMapScale()
Get web map scale- 返回:
- Web map scale
-
setWebMapScale
public void setWebMapScale(double value)
Set web map scale- 参数:
value- Web map scale
-
getLoadingImage
public java.awt.Image getLoadingImage()
A property for an image which will be display when an image is still loading.- 返回:
- the current property value
-
setLoadingImage
public void setLoadingImage(java.awt.Image loadingImage)
A property for an image which will be display when an image is still loading.- 参数:
loadingImage- the new property value
-
isDrawTileBorders
public boolean isDrawTileBorders()
Indicates if the tile borders should be drawn. Mainly used for debugging.- 返回:
- the value of this property
-
setDrawTileBorders
public void setDrawTileBorders(boolean drawTileBorders)
Set if the tile borders should be drawn. Mainly used for debugging.- 参数:
drawTileBorders- new value of this drawTileBorders
-
setWebMapProvider
public void setWebMapProvider(WebMapProvider prov)
Set web map provider- 参数:
prov- The web map provider
-
getWebMapProvider
public WebMapProvider getWebMapProvider()
Get web map provider- 返回:
- Web map provider
-
getAddressLocation
public GeoPosition getAddressLocation()
-
setAddressLocation
public void setAddressLocation(GeoPosition pos, int zoom)
-
setAddressLocation
public void setAddressLocation(GeoPosition pos)
-
repaint
public void repaint()
Repaint
-
drawMapTiles
public void drawMapTiles(java.awt.Graphics2D g, int zoom, int width, int height)Draw the map tiles- 参数:
g- Graphics2Dzoom- Zoom level to draw atwidth- The widthheight- The height
-
drawMapTiles
public void drawMapTiles(java.awt.Graphics2D g, int zoom, java.awt.Rectangle viewportBounds)Draw the map tiles. This method is for implementation use only.- 参数:
g- Graphicszoom- zoom level to draw atviewportBounds- View bounds
-
drawWebMapLayer
public void drawWebMapLayer(java.awt.Graphics2D g, int width, int height, TileLoadListener tll)Draw layer- 参数:
g- The Graphics2Dwidth- Canvas widthheight- Canvas heighttll- TileLoadListener
-
isTileOnMap
public boolean isTileOnMap(int x, int y, java.awt.Dimension mapSize)
-
calculateViewportBounds
public java.awt.Rectangle calculateViewportBounds(java.awt.Graphics2D g, int width, int height)Calculate view port bounds- 参数:
g- Graphic2Dwidth- The widthheight- The height- 返回:
- View port bounds rectangle
-
getLayerInfo
public java.lang.String getLayerInfo()
To string- 覆盖:
getLayerInfo在类中MapLayer- 返回:
- String
-
-