Set variable in javascript and using in my shortcode

Hey Guys i got the solution.

just include my script in footer instead of header.

add_action('wp_footer', 'spyrowebs_gmap_enqueue_scripts');

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