refactored google maps php model -> javascript view