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');