Updated for json fix.
Fixed code so that the locaitons and coordinates to populate the map are passed from the view to an ajax call in main that extrapolates the locations and coordinates that another function uses to mark the map.
Fixed order of map canvas call so it will populate the icon as well as the more details page. Also consolidated the call for the map to a separate html partial.