Hi greetings, i try to put in my PDF a google maps with a polyline, everything is good but the render of my map not showing completely; something like that
this is my code
/**
* This is a google example of here:
* https://developers.google.com/maps/documentation/javascript/shapes#maps_polyline_simple-javascript
*
*/
function initMap() {
const map = new google.maps.Map(document.getElementById("map"), {
zoom: 3,
center: { lat: 0, lng: -180 },
mapTypeId: "terrain",
});
const flightPlanCoordinates = [
{ lat: 37.772, lng: -122.214 },
{ lat: 21.291, lng: -157.821 },
{ lat: -18.142, lng: 178.431 },
{ lat: -27.467, lng: 153.027 },
];
const flightPath = new google.maps.Polyline({
path: flightPlanCoordinates,
geodesic: true,
strokeColor: "#FF0000",
strokeOpacity: 1.0,
strokeWeight: 2,
});
flightPath.setMap(map);
// ===> I add that code <===
google.maps.event.addListenerOnce(map, 'tilesloaded', function(){
window.JSREPORT_READY_TO_START = true;
});
}
thanks for the time and any help is welcome