Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google api metrics (api key) not working #40

Open
sputnik-alarm opened this issue Jun 7, 2022 · 0 comments
Open

Google api metrics (api key) not working #40

sputnik-alarm opened this issue Jun 7, 2022 · 0 comments

Comments

@sputnik-alarm
Copy link

sputnik-alarm commented Jun 7, 2022

Hi. I made simple project in Qt Creator with QML. The map is working, but Google doesn't see my api key activity. I have another project on JS with the same api key, which activity is being recognized by Google. I enabled all api's in my google maps account.

Rectangle
{
width: 1024
height: 600

    Plugin
    {
        id: mapPlugin
        name: "googlemaps"
        PluginParameter
        {
            name: "googlemaps.apikey"  //not working
            //name: "googlemaps.maps.apikey"   //not working
            value: "AI.......................................................mE"
        }
    }

    Map
    {
        id: map
        anchors.fill: parent
        plugin: mapPlugin
        center: QtPositioning.coordinate(59.919716, 30.277555)
        zoomLevel: map_zoom_level

I rebuild plugin adding direct specifing of api key like this:

if (parameters.contains(QStringLiteral("googlemaps.places.apikey")))
m_apiKey = parameters.value(QStringLiteral("googlemaps.places.apikey")).toString().toLatin1();
else
m_apiKey = parameters.value(QStringLiteral("googlemaps.apikey")).toString().toLatin1();
m_apiKey = "AI.......................................................................mE";

I found 4 files where i can do it. I redeployed project and refreshed plugin library files in the project and Qt folders. Not working.

@sputnik-alarm sputnik-alarm changed the title Google api metrics not working Google api metrics (api key) not working Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant