Fix 'view on map' button and associated js function.