Problem with the Google Maps API

0

I'm doing a web application where I mark points on the map based on the address obtained, as I do not have the coordinates of the address I want to mark researching I saw that Google has the Geocoder object that allows me to code the given address and so get the coordinates to mark it on the map

<script>
    var gCoder = new google.maps.Geocoder();

    var objInformacion = {
        address: "Juan Pablos 150 Nte. Primero de Cobián, Torreón, Coahuila"
    }

    gCoder.geocode(objInformacion, fn_coder);

    function fn_coder(datos)
    {
        var coordenadas = datos[0].geometry.location; 

        var config = {
            map: gMapa,
            position: coordenadas,
            title: "Colegio Cervantes",
            icon: "img/icono.png"
        }

        var gMarkerDV = new google.maps.Marker(config);
    }

<script>

It is assumed with this code that I do what I said above, the problem here is that when I run my web application I get this error:

Geocoding Service: This API project is not authorized to use this API.

How can I solve this?

    
asked by Jorge Alonso 08.11.2018 в 21:27
source

0 answers