Google Map gave error!

Asked

Viewed 66 times

1

Hello,

I am trying to add a map to my site using the API key but it appears like this:

inserir a descrição da imagem aqui

I followed the tutorial to avoid cheating me but it appears as a mistake on my page... someone can help me?

Code:

#map {
    height: 100%;
    width: 100%;
}
<div id="map"></div>
        <script>
                var map;
                function initMap() {
                  map = new google.maps.Map(document.getElementById('map'), {
                    center: {lat: 38.736946, lng: -9.142685},
                    zoom: 9,
                  });
                }
              </script>
              <script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA44NxTW1Z1B5uPHTnEaVj6eJK_2LJwWc4&callback=initMap"></script>

  • Here is saying that your key has been deleted by google: Google Maps JavaScript API error: DeletedApiProjectMapError&#xA;https://developers.google.com/maps/documentation/javascript/error-messages#deleted-api-project-map-error. You have to do another.

  • @Augustovasques still doesn’t work and I’ve already changed my api!

  • 1

    Please do not misread the original question in order to invalidate the existing answers; you asked a question, it was answered. If there are still other questions, these should be asked in new questions, but always respecting the precepts of the community defined in the How to Ask and in the help center.

1 answer

2


  • This worked initially but appeared another error I will edit the question.

  • 2

    @Davidmv Please do not misrepresent the original question in order to invalidate the existing answers; you asked a question, it was answered. If there are still other questions, these should be asked in new questions, but always respecting the precepts of the community defined in the guide of [Ask] and [help].

Browser other questions tagged

You are not signed in. Login or sign up in order to post.