Package huskymaps

Class MapServer


  • public class MapServer
    extends Object
    Run the huskymaps server.
    See Also:
    MapGraph
    • Constructor Detail

      • MapServer

        public MapServer()
    • Method Detail

      • overlay

        private static void overlay​(BufferedImage image,
                                    List<Location> route,
                                    MapServer.BoundingBox bbox)
        Overlay the route on the image using the bounding box parameters.
        Parameters:
        image - the input image.
        route - the input route.
        bbox - the bounding box.
      • port

        private static int port()
        Returns the port for communicating with the server.
        Returns:
        the port for communicating with the server.
      • url

        private static URL url​(MapServer.BoundingBox bbox,
                               int width,
                               int height,
                               List<Location> locations)
                        throws MalformedURLException
        Return the API URL for retrieving the map image.
        Parameters:
        bbox - the bounding box.
        width - the width of the window.
        height - the height of the window.
        locations - the list of locations (or null).
        Returns:
        the URL for retrieving the map image.
        Throws:
        MalformedURLException - if the URL is invalid.