Package nl.tudelft.simulation.dsol.animation.gis.map

## Interface GisMapInterface

All Superinterfaces:
  `Serializable`

All Known Implementing Classes:
  `GisMap`

    public interface GisMapInterface
    extends Serializable

This interface defines the map.

Copyright (c) 2020-2021 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.

Author:
  Alexander Verbraeck

### Field Summary

Fields
`static byte` `AIRPHOTO` AIRPHOTO.
`static byte` `ANGLEDEG` ANGLEDEg.
`static byte` `ANGLERAD` ANGLERAd.
`static double` `CENTIMETER_PER_INCH` CENTIMETER_PER_INCH.
`static double` `DD_TO_METER` DD_TO_METER (DD stands for decimal degrees).
`static double` `FEET_TO_METER` FEET_TO_METER.
`static byte` `IMAGE` IMAGe.
`static double` `INCH_TO_METER` INCH_TO_METER.
`static double` `KILOMETER_TO_METER` KILOMETER_TO_METER.
`static byte` `LINE` LINE.
`static double` `MILES_TO_METER` MILES_TO_METER.
`static byte` `POINT` POINT.
`static byte` `POLYGON` POLYGON.
`static byte` `TEXT` TEXT.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `addLayer​(LayerInterface layer)` Setter for property layers.
`Graphics2D` `drawMap​(Graphics2D graphics)` draws the map on a graphics object.
`ImmutableList<LayerInterface>` `getAllLayers()` Getter for all the property layers.
`Bounds2d` `getExtent()` Getter for property extent.
`MapImageInterface` `getImage()` Getter for property image.
`ImmutableMap<String,​LayerInterface>` `getLayerMap()` Getter for the map of layer names to property layers.
`String` `getName()` Getter for property name.
`double` `getScale()` returns the scale of the map.
`double` `getUnitImageRatio()` returns the scale of the Image.
`MapUnits` `getUnits()` Getter for property units.
`ImmutableList<LayerInterface>` `getVisibleLayers()` Getter for all the visible property layers.
`void` `hideLayer​(String layerName)` Hide a layer.
`void` `hideLayer​(LayerInterface layer)` Hide a layer.
`boolean` `isDrawBackground()` return whether background is drawn or not.
`boolean` `isSame()` Return whether the map has not been changed, and reset the same parameter to true.
`void` `setDrawBackground​(boolean drawBackground)` set whether background is drawn or not.
`void` `setExtent​(Bounds2d extent)` Setter for property extent.
`void` `setImage​(MapImageInterface image)` Setter for property image.
`void` `setLayer​(int index, LayerInterface layer)` Setter for property layers.
`void` `setLayers​(List<LayerInterface> layers)` Setter for property layers.
`void` `setName​(String name)` Setter for property name.
`void` `setUnits​(MapUnits units)` Setter for property units.
`void` `showLayer​(String layerName)` Show a layer.
`void` `showLayer​(LayerInterface layer)` Show a layer.
`void` `zoom​(double zoomFactor)` zooms the map with a particular factor.
`void` `zoomPoint​(Point2D pixelPosition, double zoomFactor)` zooms the map based on a given position in the image.
`void` `zoomRectangle​(SerializableRectangle2D rectangle)` zooms the map based on a given rectangle.

### Field Detail

#### TEXT

    static final byte TEXT

TEXT.

See Also:
  Constant Field Values

#### ANGLEDEG

    static final byte ANGLEDEG

ANGLEDEg.

See Also:
  Constant Field Values

#### ANGLERAD

    static final byte ANGLERAD

ANGLERAd.

See Also:
  Constant Field Values

#### IMAGE

    static final byte IMAGE

IMAGe.

See Also:
  Constant Field Values

#### AIRPHOTO

    static final byte AIRPHOTO

AIRPHOTO.

See Also:
  Constant Field Values

#### POLYGON

    static final byte POLYGON

POLYGON.

See Also:
  Constant Field Values

#### POINT

    static final byte POINT

POINT.

See Also:
  Constant Field Values

#### LINE

    static final byte LINE

LINE.

See Also:
  Constant Field Values

#### FEET_TO_METER

    static final double FEET_TO_METER

FEET_TO_METER.

See Also:
  Constant Field Values

#### INCH_TO_METER

    static final double INCH_TO_METER

INCH_TO_METER.

See Also:
  Constant Field Values

#### KILOMETER_TO_METER

    static final double KILOMETER_TO_METER

KILOMETER_TO_METER.

See Also:
  Constant Field Values

#### MILES_TO_METER

    static final double MILES_TO_METER

MILES_TO_METER.

See Also:
  Constant Field Values

#### DD_TO_METER

    static final double DD_TO_METER

DD_TO_METER (DD stands for decimal degrees).

See Also:
  Constant Field Values

#### CENTIMETER_PER_INCH

    static final double CENTIMETER_PER_INCH

CENTIMETER_PER_INCH.

See Also:
  Constant Field Values

### Method Detail

#### drawMap

    Graphics2D drawMap​(Graphics2D graphics)
                throws GraphicsException,
                       RemoteException

draws the map on a graphics object.

Parameters:
  `graphics` - Graphics2D; the graphics object
Returns:
  Graphics2D
Throws:
  `GraphicsException` - on drawing failure
  `RemoteException` - on network failure

#### getExtent

    Bounds2d getExtent()
                throws RemoteException

Getter for property extent.

Returns:
  Bounds2d; the extent of the map
Throws:
  `RemoteException` - on network exception

#### getImage

    MapImageInterface getImage()
                        throws RemoteException

Getter for property image.

Returns:
  ImageInterface; the value of property image.
Throws:
  `RemoteException` - on network exception

#### getLayerMap

    ImmutableMap<String,​LayerInterface> getLayerMap()
                                                   throws RemoteException

Getter for the map of layer names to property layers.

Returns:
  Bounds2d; the value of property layers.
Throws:
  `RemoteException` - on network exception

#### getAllLayers

    ImmutableList<LayerInterface> getAllLayers()
                                        throws RemoteException

Getter for all the property layers.

Returns:
  List the value of property layers.
Throws:
  `RemoteException` - on network exception

#### getVisibleLayers

    ImmutableList<LayerInterface> getVisibleLayers()
                                            throws RemoteException

Getter for all the visible property layers.

Returns:
  List the value of property layers.
Throws:
  `RemoteException` - on network exception

#### isSame

    boolean isSame()
            throws RemoteException

Return whether the map has not been changed, and reset the same parameter to true.

Returns:
  whether the map has not been changed, and reset the same parameter to true
Throws:
  `RemoteException` - on network exception

#### getName

    String getName()
            throws RemoteException

Getter for property name.

Returns:
  String the value of property extent.
Throws:
  `RemoteException` - on network exception

#### getScale

    double getScale()
             throws RemoteException

returns the scale of the map.

Returns:
  double the scale of the map in its units
Throws:
  `RemoteException` - on network exception

#### getUnitImageRatio

    double getUnitImageRatio()
                      throws RemoteException

returns the scale of the Image.

Returns:
  double the unitPerPixel
Throws:
  `RemoteException` - on network exception

#### getUnits

    MapUnits getUnits()
               throws RemoteException

Getter for property units.

Returns:
  MapUnits the value of property units.
Throws:
  `RemoteException` - on network exception

#### setExtent

    void setExtent​(Bounds2d extent)
            throws RemoteException

Setter for property extent.

Parameters:
  `extent` - Bounds2d; New value of the map extent.
Throws:
  `RemoteException` - on network exception

#### setImage

    void setImage​(MapImageInterface image)
           throws RemoteException

Setter for property image.

Parameters:
  `image` - ImageInterface; New value of property image.
Throws:
  `RemoteException` - on network exception

#### setLayers

    void setLayers​(List<LayerInterface> layers)
            throws RemoteException

Setter for property layers.

Parameters:
  `layers` - List<LayerInterface>; New value of property layers.
Throws:
  `RemoteException` - on network exception

#### setLayer

    void setLayer​(int index,
                  LayerInterface layer)
           throws RemoteException

Setter for property layers.

Parameters:
  `index` - int; Index value of layer
  `layer` - LayerInterface; New value of property layers.
Throws:
  `RemoteException` - on network exception

#### addLayer

    void addLayer​(LayerInterface layer)
           throws RemoteException

Setter for property layers.

Parameters:
  `layer` - LayerInterface; New value of property layers.
Throws:
  `RemoteException` - on network exception

#### hideLayer

    void hideLayer​(LayerInterface layer)
            throws RemoteException

Hide a layer.

Parameters:
  `layer` - LayerInterface; the layer to hide
Throws:
  `RemoteException` - on network exception

#### showLayer

    void showLayer​(LayerInterface layer)
            throws RemoteException

Show a layer.

Parameters:
  `layer` - LayerInterface; the layer to show
Throws:
  `RemoteException` - on network exception

#### hideLayer

    void hideLayer​(String layerName)
            throws RemoteException

Hide a layer.

Parameters:
  `layerName` - String; the name of the layer to hide
Throws:
  `RemoteException` - on network exception

#### showLayer

    void showLayer​(String layerName)
            throws RemoteException

Show a layer.

Parameters:
  `layerName` - String; the name of the layer to show
Throws:
  `RemoteException` - on network exception

#### setName

    void setName​(String name)
          throws RemoteException

Setter for property name.

Parameters:
  `name` - String; new value of property name.
Throws:
  `RemoteException` - on network exception

#### setUnits

    void setUnits​(MapUnits units)
           throws RemoteException

Setter for property units.

Parameters:
  `units` - MapUnits; new value of property units.
Throws:
  `RemoteException` - on network exception

#### zoom

    void zoom​(double zoomFactor)
       throws RemoteException

zooms the map with a particular factor.

Parameters:
  `zoomFactor` - double; (0=1)
Throws:
  `RemoteException` - on network exception

#### zoomPoint

    void zoomPoint​(Point2D pixelPosition,
                   double zoomFactor)
            throws RemoteException

zooms the map based on a given position in the image.

Parameters:
  `pixelPosition` - Point2D; the position in the image
  `zoomFactor` - double; the zoomFactor (0=1)
Throws:
  `RemoteException` - on network exception

#### zoomRectangle

    void zoomRectangle​(SerializableRectangle2D rectangle)
                throws RemoteException

zooms the map based on a given rectangle.

Parameters:
  `rectangle` - SerializableRectangle2D; a rectangle in the map (image units)
Throws:
  `RemoteException` - on network exception

#### isDrawBackground

    boolean isDrawBackground()

return whether background is drawn or not.

Returns:
  drawBackground

#### setDrawBackground

    void setDrawBackground​(boolean drawBackground)

set whether background is drawn or not.

Parameters:
  `drawBackground` - boolean; set drawBackground