Cannot Hide Google Map if custom field is blank

I would try

if ( $map && $map != "" )

as you set the variable, but it can also contain an empty string.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)