Trying to add infoWindow above tag in google maps.
The code itself:
function initMap() { var myLatlng = new google.maps.LatLng(43.111939, 131.936366); var mapOptions = { zoom: 16, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById('map'), mapOptions); var contentString = '<table border = "0">'+ +'<tr><td rowspan = "3"></td></tr>'+ +'<tr><td>Режим работы</td><td></td></tr>'+ +'<tr><td>Еще</td><td>wqe</td></tr></table>'; var infowindow = new google.maps.InfoWindow({ content: contentString }); var marker = new google.maps.Marker({ position: myLatlng, map: map, title: 'Bahnhofstraße 32' }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); // show map, open infoBox google.maps.event.addListenerOnce(map, 'tilesloaded', function() { infowindow.open(map, marker); }); } google.maps.event.addDomListener(window, 'load', initMap); However, the label styles do not change, the whole content of the window for some reason turns into NanNanNanNan , and knocks out the console:
Uncaught mc {message: "initMap is not a function", name: "InvalidValueError", stack: "Error↵ at new mc ( https://maps.googleapis.com/m… 591J_hdqav9LPA07faxn05jhk & callback = initMap: 135: 73"}
If you just drive the tex \ paragraphs, etc., then there is no problem. As soon as the amount of text in contentString becomes a bit more, that's all. And even with smaller text sizes, styles don't want to be loaded.
MB who faced such a disaster?