Google Map Tracking issues

Tags: #<Tag:0x00007fe22b87baf8>


Hello Everyone,

I have tried everything to get the google map tracking working with my Boron. I have tested the API from the particle website and it tests fine, I can also see it hit my API on google’s site when I test it using the test button on the particle site.

However I simply cannot get my Boron to report anything back to the events in the console at all. This is the sample code I am using:

GoogleMapsDeviceLocator locator;

void setup() {
  // Scan for visible networks and publish to the cloud every 30 seconds
  // Pass the returned location to be handled by the locationCallback() method

void locationCallback(float lat, float lon, float accuracy) {
  // Handle the returned location data for the device. This method is passed three arguments:
  // - Latitude
  // - Longitude
  // - Accuracy of estimated location (in meters)

void loop() {

It flashes just fine to the Boron but it does nothing? Is there something else I need to do to get the Boron talking to google maps? Perhaps I am leaving out the a step? I followed the tutorial here:

Its been 3 days now and I am ready to give up. Any help would be great!

Thank you!


Is this a Boron 2G/3G or Boron LTE?
Not all ublox modules support aGPS or cell tower location.



It is a brand new Boron LTE. I have got all kinds of things to work with it. I can turn on lights /leds/ servos no issues. However nothing I do makes the Google Maps work! Its very frustrating.


Does anyone know if there is something left out of the tutorial to get this working? If you follow it step by step it will not work. Is there something that has to be done first? I am online with Boron I can turn LEDS on and off. Is there some type of diagnostic that can be ran? Or a different more complete tutorial?

I am using the Web IDE and Console does that make a difference? In my event log I see all my software installs and reboots but nothing else.

Thank you for any help!


The Google Map Device Locator does not currently work on the Boron LTE. On Device OS 1.2.0 and later it should be possible to make it work but I have not updated the library to support it yet. I’ll do so soon.


Thank you so much for responding to my post! I really felt upset with myself after fallowing the tutorial and failing every time. I am new to this so I figured it was me.

Thank you!


Version 0.0.5 of the google-maps-device-locator library now supports the Boron LTE and B Series B402 LTE SoM when using Device OS 1.2.1 or later!

The library still works with older Device OS (back to 0.7.0) on other devices.

For the E Series LTE and Electron LTE using 1.2.1 or later is recommended, otherwise the library won’t work in Canada or Mexico properly unless you manually configure it. With 1.2.1 it works properly everywhere automatically.


Is there a way to do Reverse geocoding? Something similar to this

i.e. where i am able to get the Long Lat and be able to convert in physical address?

Secondly i also want to be able to get the travel time between two locations (one saved location and the other of the device)? Is that possible as well?


While the answer to that would be interesting in this forum too, the Google Maps community would probably be the prime audience for that question.
Once you know how to request that data from Google (or any competing service) you can use webhooks to get it onto your device.


Google has those services. On the Google Maps API documentation page you’ll probably be interested in one or more of the directions API, distance matrix API, and places API.


Thank you for your response! I have not used a webhook before so this is not a familiar area for me…

So essentially i would get the location in long lat as described in this post above. And then using a webhook call the Google Map Api and make the corresponding calls? Correct?

and thank you @rickkas7, the link you sent has what i need, just need to figure out how to use it now :slight_smile:


@rickkas7 does this work with Xenon as well? My code works fine with the Argon, but with Xenon it does not seem to be publishing anything.


It does not work with the Xenon because Wi-Fi geolocation requires a list of nearby Wi-Fi access points. This information is not available on the Xenon because it doesn’t have a Wi-Fi radio.

Google Maps geolocation only works on cellular devices (Electron, E Series, Boron) and Wi-Fi devices (Photon, P1, Argon).


Yeah thats what i thought. Thanks for confirming :slight_smile:


@rickkas7, I have another question… So i was planning to send the geolocation received over to AWS Lambda via the particle.function() … I saved the geolocation in a comma separated string (lat, long) and when i was about to send it over i came across this piece of information :frowning:

// Cloud functions must return int and take one String

So apparently i can only send ints… any idea how i can send this information now (i.e. long lat info)?


@ScruffR any suggestions?


Sending out strings from your device is best doen via Particle.publish().
If your desired endpoint can’t directly subscribe to SSEs your next best option is using webhooks.


i was thinking of compressing both numbers in a single int variable and sending that over. At the cost of some precision of course.


You’d lose quite a lot precision since you’d only have 4~5 digits for lat and lon.

To get a feeling for the loss take a set of coordinates, compress it as intended and then modify the least siginificant digit and check on google maps how that impacts your reported location.


HI. Do you know if the SARA-G350 supports cell tower location. I have tried to run the example firmware but not getting any results