Package huskymaps

Class MapServer.BoundingBox

  • Enclosing class:
    MapServer

    private static class MapServer.BoundingBox
    extends Object
    A bounding box represented by the upper-left and lower-right corners' latitudes and longitudes.
    • Field Detail

      • ullat

        private final double ullat
      • ullon

        private final double ullon
      • lrlat

        private final double lrlat
      • lrlon

        private final double lrlon
    • Constructor Detail

      • BoundingBox

        private BoundingBox​(double ullat,
                            double ullon,
                            double lrlat,
                            double lrlon)
        Constructs a new bounding box from the given parameters.
        Parameters:
        ullat - upper-left latitude.
        ullon - upper-left longitude.
        lrlat - lower-right latitude.
        lrlon - lower-right longitude.
    • Method Detail

      • from

        private static MapServer.BoundingBox from​(io.javalin.http.Context ctx)
        Returns a new bounding box from the given Context.
        Parameters:
        ctx - the Context.
        Returns:
        a new bounding box with the corresponding context parameters.
      • center

        private Location center()
        Returns the location representing the center of this bounding box.
        Returns:
        the location representing the center of this bounding box.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object