I can only show a map, it's weird because this only works when the id of my div is map when I put another id that is not map that is created but not shown
this code works, creates the map and shows it
<div id="map"></div>
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 13,
center: new google.maps.LatLng(20.967370, -89.592586),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
but this code does not work, when I inspect the div, I create the map but it does not show it
<div id="map1"></div>
var map = new google.maps.Map(document.getElementById('map1'), {
zoom: 13,
center: new google.maps.LatLng(20.967370, -89.592586),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
although I delete the previous code and only leave map1, it still does not work, this only works when in the id
of the div
I have map
Could someone tell me what I'm doing wrong ?, I just generated my api key, I have not registered my billing account, that's the reason?