# Google Geolocation API issues

**URL:** <https://community.particle.io/t/google-geolocation-api-issues/49751>\
**Category:** Troubleshooting\
**Tags:** electron\
**Created:** [May 14, 2019, 8:10pm UTC](https://community.particle.io/t/google-geolocation-api-issues/49751 "2019-05-14T20:10:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vsthose](https://avatars.discourse-cdn.com/v4/letter/v/53a042/32.png) [@vsthose](https://community.particle.io/u/vsthose)\
**Post date:** [May 14, 2019, 8:10pm UTC](https://community.particle.io/t/google-geolocation-api-issues/49751/1 "2019-05-14T20:10:51Z")

</div>

I know this has been covered a number of times, however, it was working as recently as a month ago and we have developed this software for geolocation and now it is no longer functioning.

I have a valid and paid Google API subscription.

I created an integration at the device level that is talking to google and receiving the correct data.

```auto
{
  "name": "deviceLocator",
  "data": "{\"c\":{\"o\":\"T-Mobile\",\"a\":[{\"i\":21132,\"l\":8104,\"c\":310,\"n\":260}]}}",
  "ttl": 60,
  "published_at": "2019-05-14T18:54:35.564Z",
  "coreid": "420030001550483553353620"
}

```

```auto
POST /geolocation/v1/geolocate?key=AIza.....................................................
 HTTP/1.1
User-Agent: ParticleBot/1.1 (https://docs.particle.io/tutorials/integrations/google-maps/)
host: www.googleapis.com
accept: application/json
content-type: application/json
content-length: 145
Connection: keep-alive

```

And the response:

```auto
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Date: Tue, 14 May 2019 18:54:35 GMT
Vary: X-Origin
Content-Type: application/json; charset=UTF-8
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: quic=":443"; ma=2592000; v="46,44,43,39"
Accept-Ranges: none
Vary: Origin,Accept-Encoding
Transfer-Encoding: chunked

{"location":{"lat":39.5547152,"lng":-84.2308303},"accuracy":2406}

```

I am getting a vaild hook-response in the devices events…

```auto
hook-response/deviceLocator/420030001550483553353620/0
39.5547152,-84.2308303,2406

```

here are the important bits of my program:

```auto
#include <google-maps-device-locator.h>
...
String strLong;
String strLat;
String strAcc;
String locationInfo;
...
GoogleMapsDeviceLocator locator;

void locationCallback(float lat, float lng, float accuracy) {
      
    strLat = String(lat);
    strLong = String(lng);
    strAcc = String(accuracy);

    locationInfo = String(lat)+","+String(lng)+","+String(accuracy);
    
}

void setup() {
...
    Particle.variable("locationInfo", locationInfo);
    locator.withSubscribe(locationCallback).withLocatePeriodic(30); 
...

    Particle.connect();

    delay(1000);
}

void loop() {
    
    locator.loop();

}

```

As I said, it DID work, but now I only get empty strings from the callback. I have tried formatting things a number of different ways with no change. If I leave the string variables empty, they remain empty and if I preset them to blank or “0”, they remain that way after the callback. its as if the callback is doing nothing at all.

This a Particle Electron and I am currently running 1.2 .0-beta.1 if that matters, but i think it was occuring in 0.8 as well.

Any input would be appreciated!

---

<div class="post-metadata">

**Author:** ![vsthose](https://avatars.discourse-cdn.com/v4/letter/v/53a042/32.png) [@vsthose](https://community.particle.io/u/vsthose)\
**Post date:** [June 7, 2019, 6:05pm UTC](https://community.particle.io/t/google-geolocation-api-issues/49751/2 "2019-06-07T18:05:50Z")

</div>

I am still having this issue.

I even put Serial.print statements in my call back and I am monitoring messages and it appears that the callback never occurs.

Any assistance would be helpful!
