I am trying to get variable from another variable to get geocoding of maps, but i stuck with this error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in C:\xampp\htdocs\wordpress\wp-content\plugins\WP-Shortcode-Boilerplate-master\shortcode\shortcode-member.php on line 32
this is my code: function aa_member_shortcode( $atts) {
return "<div id='map'></div>
<script>
function initMap() {
var latt= parseInt($atts['lat']);
var lngg= parseInt($atts['lng']);
var uluru = {lat: latt, lng: lngg};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 4,
center: uluru
});
var marker = new google.maps.Marker({
position: uluru,
map: map
});
}
</script>
<script async defer
src='https://maps.googleapis.com/maps/api/js?key=AIzaSyDvHNBbBdWA49bIsUMLwj3RpoZFQWSRJJ0&callback=initMap'>
</script>";
}