I am implementing google map api for my website, but smarty is throwing some kind of syntax error in the javascript module. This is really surprising because I just copied the code from examples given on google's website.
Smarty Says:
on line 236 "var myLatLng = {lat: -25.363, lng: 131.044};" - Unexpected ": ", expected one of: "}"
and my Javascript tag is:
function initMap() {
var myLatLng = {lat: -25.363, lng: 131.044};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 4,
center: myLatLng
});
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Hello World!'
});
}
I don't understand what the problem is and how to solve this.