Você está na página 1de 3

Extra Credit

In this assig nment you are to work in a g roup of 3 . Groups of any other size are not
allowed unless otherwise approved by Prof . Cervantes.
Your group will create a web application that allows a User to specif y their location, and
retrieve a list of nearby points-of-interests . A point-of -interest, or POI f or short, can
be anything including gas stations, movie theaters, bus stops, and restaurants. You are
f ree to decide the breadth and depth of your application, however, you are not allowed to
use the Starbucks dataset that was previously provided.
I recommend investig ating the Google Maps API, and the Factual API f or use in your project.
To complete your project successf ully, you must implement a Model-View-Controller (MVC)
application with the f ollowing f unctionality:

Search by Location

To implement searching by location, you should f ollow an MVC approach that uses a
Controller (Servlet) and a View (JSP) to present the search f orm and results. Use the
f ollowing names, URL-mappings, and f older locations f or the various pieces of your project:
Controller URL-Mapping:
- http://cs3.calstatela.edu:8080/cs320stuXX/EC/Search
- Note: As usual, replace XX with your student ID
View Location: /WEB-INF/EC/Search.jsp
Your application should accept a Users Latitude and Longitude , and a search
Radius , and retrieve a list of nearby POIs. The latitude and longitude of the Users current
location, and search radius, should be manually specif ied using input f ields with the
f ollowing IDs:

Latitude
The latitude f ield should be an input of type text with a name lat.

Longitude
The longitude f ield should be an input of type text with a name lon.

Radius
The radius f ield should be an input of type text with a name radius.
Failure to name your input elements using the specif ication above will result in zero (0)
credit on your assig nment.
Upon submitting the search f orm, your application will query a local database, or an
external data-source (i.e. web service), to f ind data specif ic to your application. All data
should be populated in a Model , and attached to the appropriate scope object f or display in
your View .
Your view must leverage JST L and EL to present any and all data to your User.

Auto-Locate

You can earn additional Extra Credit by adding a Locate Me button to your search f orm.
This button will not submit your f orm. Instead, it will execute client-side JavaScript to
g et your Users current latitude and longitude when it is clicked. The auto-detected values
should automatically be populated into your f orm elements. This auto-population should
ag ain, happen via JavaScript in the browser. No server-side code is required to make this
happen.

Search Results

Your search results should be presented beneath the search f orm. They should be
contained within a DIV that has an id results.
Your results div should be segmented into two sections: a list of results , and a
Google Maps Image .

List of Results

You are to display all result objects in an Unordered List with an ID results-list.
Each search result object should be presented in a List Item with a CLASS resultitem.
You are to present each result-item in an interesting way. Take some time to style
your result items to be presentable.

Google Maps Image


You are to display a Goog le Maps Image that is centered at the User s location.
The location of each result item should appear as a pin on the map.
A User should be allowed to pan and zoom the map.
Upon clicking on pin , a tooltip should appear that displays inf ormation regarding
the POI.

Você também pode gostar