Classes and Data Structures
This class provides
static methods that allow processing requests from the web browser for map images. These images will be rastered into one large image to be displayed to the user.
This class does not have any instance variables.
Represents a point on the map.
x- the x-axis (or equivalent) coordinate of a point.
y- the y-axis (or equivalent) coordinate of a point.
An augmented graph that is more powerful than a standard StreetMapGraph.
Specifically, it supports the following additional operations such as finding a node in the graph whose associated
(lon, lat) coordinates are closest to some given coordinates.
HashMap<Point, Node> nodePointMap- a map keeping track what graph
Nodeis associated with a certain
Pointon the map.
WeirdPointSet pointSet- a set of all the points associated with the reachable
Nodes in this graph.
closest method takes in map coordinates,
(lon, lat), and returns the
id of the graph
Node, whose associated
Point, is closest to the given coordinates. We pass the given coordinates into our
nearest method to get the nearest
Point. We then use the
nodePoint map to find the graph
Node associated with the returned
Note: This section was not required for Project 2, but is necessary for Project 3.