added js functions based on g maps objects and geolocation on server side