Creating Google Maps marker resets map to default zoom and coordinates

I’ve tried this way but it seems not working.
err_marker