on-internet
← Community

Uncaught TypeError: Cannot read properties of undefined (reading 'maps')

Stack Overflow ·

I'm trying to display map from google map on file html.twig, but this errors it displayed to me Uncaught TypeError: Cannot read properties of undefined (reading 'maps') my twig : let map, google; let markers = []; var infowindow = new google.maps.InfoWindow(); function initMap() { const haightAshbury = { lat: 36.77355514795189, lng: 9.088027850665279 }; map = new google.maps.Map(document.getElementById("map"), { zoom: 10, center: haightAshbury, draggable: true }); map.addListener("click", (event) => { addMarker(event.latLng); }); } function addMarker(location) { deleteMarkers(); const marker =

Comments

Sign in or sign up to comment and upvote.

No comments yet.