title: How to make Google Maps Javascript API calls periodically in background?
body: <p>I am creating a map with polygons fences(using Google Maps Javascript API) and want to periodically check if certain points(location of mobile devices) exist within those fences. I certainly have the location of mobile devices available periodically. But would like to know if it is possible to somehow make the API calls in the background and receive data without having to load/view the web page.. and also how the same could be implemented?</p>
  
  <p>To add, what I want to precisely achieve is this:</p>
  
  <p>The Google Maps Javascript API has a Geometry library that allows to make calls to a method <code>google.maps.geometry.poly.containsLocation(LatLng coordinate,Polygon polygon)</code>. </p>
  
  <p>I have the both the  <code>coordinate</code> and <code>polygon</code> coordinate values stored in the database. But somehow I need to be able to periodically call this method on the API and make some changes to the devices being tracked which I am still stuck at. The periodic check needs to be implemented in C++ or would be glad to take in any recommendations.</p>
  
  <p>I had a look at <a href="https://github.com/tparkin/Google-Maps-Point-in-Polygon" rel="nofollow">https://github.com/tparkin/Google-Maps-Point-in-Polygon</a> to see if I can convert this logic and avoid making API calls but the library is still not being supported.Need to explore it further.
   Any help/guidance is appreciated.</p>