College Park Crime Reports

Looking Ahead

I'm going to leave off my narrative for now, but I'll come back and update this document when I make major changes. Here are some additions I'm planning to make.

Highlighting a Report Row

When a user selects a report's marker on the List view's map, I'd like to highlight the row that holds the report's data.

Improving the Application's Looks with CSS

My application isn't a lot to look at, besides the cool Google maps. Some CSS rules would make things a little more presentable.

Adding More Interactivity

When I added code to enable updating the latitude and longitude values in the form fields whenever a report's marker was moved, I required the user to click "use these coordinates" in the HTML window to make the change happen. On the other hand, when the values are changed manually in the fields, the marker moves automatically. This is kind of arbitrary: it was just easiest to code this way. Maybe I should add controls into the form to determine whether one or both updates happen automatically or require user action.

Also, I could bring panning and centering on a marker to the List view. That way, selecting a record's row would bring the marker to the center. I might want to open the window too, so it's clear which marker belongs to the record.

Nicer Date Display and Controls

As I wrote above, I could provide a much nicer interface to the date data in the edit form. The way the date is displayed in the Show and List views leaves something to be desired too. To improve the date displays, I should look into customizing the form helper for the date control and into the way Ruby controls the display of date values.

Dynamic Map Zooming

I have built in automatic map centering in the List view. But I should also dynamically decide what zoom level will include all the markers. I can do this by determining the largest rectangle that includes all the points, and then setting the zoom accordingly. This will require me to dig into Google maps to determine the actual scale of zoom levels like 13 or 14.

Helper Tags for Javascript Generation

As I wrote above, developing a helper tag class would help clean up the javascript accumulating in the layout file.

Better semantics: categories, and sorting and filtering.

I plan to add the concept of the category to my model. Possible category topics: type of crime, type of victim (I could add non-students), status of police investigation. This would allow users to sort along these categories.

Also, as time goes by and more reports are posted, it makes sense to arrange for some filtering to limit the number of reports shown and for sorting to help people find the information they want most. Filtering options could include choosing a date period or a category. Sorting could go by category, date, location (north to south or east to west) or even by distance from a user-supplied or built-in address (like the student campus center).

Use AJAX to Move from Listing to Showing without Reloading the Page

This is an exciting idea. To give my application that desktop application feel, and cut down on the number of requests I have to make to Google for maps, I could introduce AJAX scripts that alter the settings of the existing map on the page while updating the text. For example, going from List to Show or from Show to Edit, the app wouldn't need to recreate the map and reload the entire page: it could simply load new HTML contents and change the view in the map.