Class GisMap
java.lang.Object
nl.tudelft.simulation.dsol.animation.gis.map.GisMap
- All Implemented Interfaces:
Serializable
,GisMapInterface
Provides the implementation of a Map.
Copyright (c) 2020-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information DSOL Manual. The DSOL project is distributed under a three-clause BSD-style license, which can be found at DSOL License.
The dsol-animation-gis project is based on the gisbeans project that has been part of DSOL since 2002, originally by Peter Jacobs and Paul Jacobs.
- Author:
- Alexander Verbraeck
- See Also:
-
Field Summary
Fields inherited from interface nl.tudelft.simulation.dsol.animation.gis.GisMapInterface
AIRPHOTO, ANGLEDEG, ANGLERAD, CENTIMETER_PER_INCH, DD_TO_METER, FEET_TO_METER, IMAGE, INCH_TO_METER, KILOMETER_TO_METER, LINE, MILES_TO_METER, POINT, POLYGON, TEXT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLayer
(LayerInterface layer) drawMap
(Graphics2D graphics) org.djutils.immutablecollections.ImmutableList<LayerInterface>
org.djutils.draw.bounds.Bounds2d
getImage()
org.djutils.immutablecollections.ImmutableMap<String,
LayerInterface> getName()
double
getScale()
double
returns the scale of the Image.getUnits()
org.djutils.immutablecollections.ImmutableList<LayerInterface>
void
void
hideLayer
(LayerInterface layer) boolean
boolean
isSame()
void
setDrawBackground
(boolean drawBackground) void
setExtent
(org.djutils.draw.bounds.Bounds2d extent) void
setImage
(MapImageInterface image) void
setLayer
(int index, LayerInterface layer) void
setLayers
(List<LayerInterface> layers) void
void
void
void
showLayer
(LayerInterface layer) void
zoom
(double zoomFactor) void
void
zoomRectangle
(SerializableRectangle2d rectangle)
-
Constructor Details
-
GisMap
public GisMap()constructs a new Map.
-
-
Method Details
-
addLayer
- Specified by:
addLayer
in interfaceGisMapInterface
-
setLayers
- Specified by:
setLayers
in interfaceGisMapInterface
-
setLayer
- Specified by:
setLayer
in interfaceGisMapInterface
-
hideLayer
- Specified by:
hideLayer
in interfaceGisMapInterface
-
hideLayer
- Specified by:
hideLayer
in interfaceGisMapInterface
- Throws:
RemoteException
-
showLayer
- Specified by:
showLayer
in interfaceGisMapInterface
-
showLayer
- Specified by:
showLayer
in interfaceGisMapInterface
- Throws:
RemoteException
-
isSame
- Specified by:
isSame
in interfaceGisMapInterface
- Throws:
RemoteException
-
drawMap
- Specified by:
drawMap
in interfaceGisMapInterface
- Throws:
DsolGisException
-
getExtent
public org.djutils.draw.bounds.Bounds2d getExtent()- Specified by:
getExtent
in interfaceGisMapInterface
-
getImage
- Specified by:
getImage
in interfaceGisMapInterface
-
getAllLayers
- Specified by:
getAllLayers
in interfaceGisMapInterface
-
getVisibleLayers
- Specified by:
getVisibleLayers
in interfaceGisMapInterface
-
getLayerMap
public org.djutils.immutablecollections.ImmutableMap<String,LayerInterface> getLayerMap() throws RemoteException- Specified by:
getLayerMap
in interfaceGisMapInterface
- Throws:
RemoteException
-
getName
- Specified by:
getName
in interfaceGisMapInterface
-
getScale
public double getScale()- Specified by:
getScale
in interfaceGisMapInterface
-
getUnitImageRatio
public double getUnitImageRatio()returns the scale of the Image.- Specified by:
getUnitImageRatio
in interfaceGisMapInterface
- Returns:
- double the unitPerPixel
-
getUnits
- Specified by:
getUnits
in interfaceGisMapInterface
-
setExtent
public void setExtent(org.djutils.draw.bounds.Bounds2d extent) - Specified by:
setExtent
in interfaceGisMapInterface
-
setImage
- Specified by:
setImage
in interfaceGisMapInterface
-
setName
- Specified by:
setName
in interfaceGisMapInterface
-
setUnits
- Specified by:
setUnits
in interfaceGisMapInterface
-
zoom
public void zoom(double zoomFactor) - Specified by:
zoom
in interfaceGisMapInterface
-
zoomPoint
- Specified by:
zoomPoint
in interfaceGisMapInterface
-
zoomRectangle
- Specified by:
zoomRectangle
in interfaceGisMapInterface
-
isDrawBackground
public boolean isDrawBackground()- Specified by:
isDrawBackground
in interfaceGisMapInterface
-
setDrawBackground
public void setDrawBackground(boolean drawBackground) - Specified by:
setDrawBackground
in interfaceGisMapInterface
-