Package edu.cnu.mdi.mapping
Class MapConstants
java.lang.Object
edu.cnu.mdi.mapping.MapConstants
Package-wide constants shared across the MDI mapping subsystem.
Centralizing these values eliminates the duplication bugs that arise when
the same magic number is defined independently in multiple classes (e.g.,
MAX_POP_SLIDER_VALUE previously appeared separately in both
MapControlPanel and MapView2D, creating a silent divergence
risk).
All fields are public static final. This class is not
instantiable.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EProjectionThe default map projection shown when a newMapView2Dis created and the projection selected inMapProjectionMenuon first render.static final intDefault value of the minimum-population slider used byMapControlPaneland the initial population threshold applied inMapView2D.setProjection(EProjection).static final doubleThe mean radius of the Earth in kilometers, used to scale the dimensionless great-circle arc length returned byMapGraphics.greatCircleLength(java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Double)(computed via the spherical law of cosines) into a real-world distance. -
Method Summary
-
Field Details
-
MIN_POP_DEFAULT
public static final int MIN_POP_DEFAULTDefault value of the minimum-population slider used byMapControlPaneland the initial population threshold applied inMapView2D.setProjection(EProjection).Cities whose recorded population is below this value are hidden on first render.
- See Also:
-
DEFAULT_PROJECTION
The default map projection shown when a newMapView2Dis created and the projection selected inMapProjectionMenuon first render.Keeping this constant in one place ensures the view and the menu always agree on which projection is initially active.
-
RADIUS_EARTH_KM
public static final double RADIUS_EARTH_KMThe mean radius of the Earth in kilometers, used to scale the dimensionless great-circle arc length returned byMapGraphics.greatCircleLength(java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Double)(computed via the spherical law of cosines) into a real-world distance.- See Also:
-