Public Storage Search Page



The goal of this page was to allow a user to search for storage units by inputting a geographical search term such as a zip code or city name. The search term that was supplied was passed to the Google Maps Geolocation API for transformation into a latitude and longitude. The coordinates were then used to center a map that was driven by the Google Maps JavaScript API. The coordinates were also used as an input for a web service which returned a list of storage facilities within the map's viewport along with data about the storage units that were currently available at these facilities. The results were rendered on the page as well as plotted as markers on the map. Upon initial page load all data was delivered to the page via server side code. The search results were refreshed via AJAX when the user filtered the data using the various controls on the page or when the user zoomed or dragged the Google Map. Adding to the complexity of this project was the requirement for four different versions of the user interface each with slightly different functionality. This problem was solved by structuring the JavaScript code in a modular fashion so that it was easy make the functional changes that were necessary from version to version.