com.supermap.mapping
Class MapViewGroup
- java.lang.Object
-
- com.supermap.mapping.MapViewGroup
-
public class MapViewGroup extends java.lang.Object
mapview group class
-
-
Constructor Summary
Constructors Constructor and Description MapViewGroup()
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
addMapView(MapView mapView)
Add MapViewvoid
cancelAnimation()
Cancels the animation of panning and zooming.void
dispose()
Disposes the resources occupied by the object.void
enableRotateTouch(boolean enableRotate)
Whether it can be rotated under the modevoid
enableSlantTouch(boolean enableSlant)
Whether it can be tiltedvoid
panOffset(double offsetX, double offsetY)
Pans this map by the specified distance.void
panTo(Point2D destPoint, int time)
Within specified time, pan the map to a specified place.void
refresh()
Redraw the current map and refresh the current map window.void
refresh(double scale, Rectangle2D bounds)
Redraw the current map and refresh the current map with the specified scale in the specified extent.void
removeMapView(MapView mapView)
Delete the specified MapViewvoid
setAngle(double angle)
Sets the rotation angle of the map.void
setCenter(Point2D center)
Sets the center point of the view bounds of this map.void
setIsVisibleScalesEnabled(boolean visibleScalesEnabled)
Sets a fixed scale to display the mapvoid
setLockedViewBounds(Rectangle2D lockedViewBounds)
Sets the visible extent of the map locked in the map control.void
setMagnifierEnabled(boolean magnifierEnabled)
Set whether to enable the magnifier featurevoid
setMagnifierRadius(int magnifierRadius)
Set the magnifying glass radiusvoid
setMaxScale(double maxScale)
Sets the maximum scale of the mapvoid
setMinScale(double minScale)
Sets the minimum scale of the map.void
setScale(double scale)
Sets the display scale of the current map.void
setViewBounds(Rectangle2D viewBounds)
Set the visible extent (display extent) of the current map.void
setViewBoundsLocked(boolean viewBoundsLocked)
Sets whether to lock the visible extent of the map in the map control.void
setVisibleScales(double[] visibleScales)
Set the fixed scale array, that is, the scale that can be displayed when the fixed scale is displayedvoid
viewEntire()
Displays the map in full extent.void
zoom(double ratio)
Zoom in or zoom out the map to a specified zoom percentage The scale of the map after zooming equals to the original scale multiplied by ratio, where, the ratio should be a positive value.void
zoomTo(double scaleDest, int time)
Within specified time, zoom the map into the specified scale.
-
-
-
Method Detail
-
addMapView
public void addMapView(MapView mapView)
Add MapView- Parameters:
mapView
- MapView
-
removeMapView
public void removeMapView(MapView mapView)
Delete the specified MapView- Parameters:
mapView
- MapView
-
enableRotateTouch
public void enableRotateTouch(boolean enableRotate)
Whether it can be rotated under the mode- Parameters:
enableRotate
- Whether it can be rotated under the mode
-
enableSlantTouch
public void enableSlantTouch(boolean enableSlant)
Whether it can be tilted- Parameters:
enableSlant
- Whether it can be tilted
-
zoom
public void zoom(double ratio)
Zoom in or zoom out the map to a specified zoom percentage The scale of the map after zooming equals to the original scale multiplied by ratio, where, the ratio should be a positive value. When ratio is larger than 1, the map will be zoomed in; when ratio is less than 1, the map will be zoomed out.- Parameters:
ratio
- the zoom percentage which must be positive.
-
panOffset
public void panOffset(double offsetX, double offsetY)
Pans this map by the specified distance.- Parameters:
offsetX
- xoffsetY
- y
-
viewEntire
public void viewEntire()
Displays the map in full extent.
-
dispose
public void dispose()
Disposes the resources occupied by the object. After calling this method, this object will not be usable.
-
refresh
public void refresh()
Redraw the current map and refresh the current map window.
-
refresh
public void refresh(double scale, Rectangle2D bounds)
Redraw the current map and refresh the current map with the specified scale in the specified extent.- Parameters:
scale
- Scalebounds
- The specified extent
-
zoomTo
public void zoomTo(double scaleDest, int time)
Within specified time, zoom the map into the specified scale.- Parameters:
scaleDest
- Scaletime
- The specified time
-
panTo
public void panTo(Point2D destPoint, int time)
Within specified time, pan the map to a specified place.- Parameters:
destPoint
- Pointtime
- The specified time
-
cancelAnimation
public void cancelAnimation()
Cancels the animation of panning and zooming.
-
setMagnifierEnabled
public void setMagnifierEnabled(boolean magnifierEnabled)
Set whether to enable the magnifier feature- Parameters:
magnifierEnabled
- Whether to enable the magnifier feature
-
setMagnifierRadius
public void setMagnifierRadius(int magnifierRadius)
Set the magnifying glass radius- Parameters:
magnifierRadius
- the magnifying glass radius
-
setViewBounds
public void setViewBounds(Rectangle2D viewBounds)
Set the visible extent (display extent) of the current map. Besides the setViewBounds() method, the view bounds of this map can also be set by specifying the Center and Scale of display extent of the map.- Parameters:
viewBounds
- The visible extent of the map
-
setViewBoundsLocked
public void setViewBoundsLocked(boolean viewBoundsLocked)
Sets whether to lock the visible extent of the map in the map control.- Parameters:
viewBoundsLocked
- Whether to lock
-
setLockedViewBounds
public void setLockedViewBounds(Rectangle2D lockedViewBounds)
Sets the visible extent of the map locked in the map control.- Parameters:
lockedViewBounds
- the locked visible extent of the map
-
setCenter
public void setCenter(Point2D center)
Sets the center point of the view bounds of this map.- Parameters:
center
- Center
-
setScale
public void setScale(double scale)
Sets the display scale of the current map.- Parameters:
scale
- Scale
-
setMaxScale
public void setMaxScale(double maxScale)
Sets the maximum scale of the map- Parameters:
maxScale
- Maximum scale
-
setMinScale
public void setMinScale(double minScale)
Sets the minimum scale of the map.- Parameters:
minScale
- Minimum scale
-
setVisibleScales
public void setVisibleScales(double[] visibleScales)
Set the fixed scale array, that is, the scale that can be displayed when the fixed scale is displayed- Parameters:
visibleScales
- the scale array
-
setIsVisibleScalesEnabled
public void setIsVisibleScalesEnabled(boolean visibleScalesEnabled)
Sets a fixed scale to display the map- Parameters:
visibleScalesEnabled
- Scale
-
setAngle
public void setAngle(double angle)
Sets the rotation angle of the map.- Parameters:
angle
- The angle point of rotation
-
-