Title: Script callback and sensor errors
Last modified: August 16, 2017

---

# Script callback and sensor errors

 *  [webelaine](https://wordpress.org/support/users/wpgirl369/)
 * (@wpgirl369)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/script-callback-and-sensor-errors/)
 * Google Maps seems to have updated their API again. I was getting a JS error “
   initMap is not a function” as well as a warning “Sensor not required.”
 * I found the problem in line 169:
 * `wp_enqueue_script( 'google-maps-api', 'https://maps.google.com/maps/api/js?sensor
   =false&key=AIzaSyA4AcYDV9EH4AmoolzFu1Mg-55Ft1mRSVY&callback=initMap' );`
 * The “sensor” and “callback” parameters need to be removed from the query string,
   so line becomes:
 * `wp_enqueue_script( 'google-maps-api', 'https://maps.google.com/maps/api/js?key
   =AIzaSyA4AcYDV9EH4AmoolzFu1Mg-55Ft1mRSVY' );`
 * I made this change to my site and it resolved the error and warning, which were
   preventing a Gravity Forms registration form from appearing. I did not see this
   add-on plugin in GitHub or I would send a pull request. 🙂

The topic ‘Script callback and sensor errors’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sugar-event-calendar-google-maps_ff8845.
   svg)
 * [Sugar Calendar - Google Maps](https://wordpress.org/plugins/sugar-event-calendar-google-maps/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sugar-event-calendar-google-maps/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sugar-event-calendar-google-maps/)
 * [Active Topics](https://wordpress.org/support/plugin/sugar-event-calendar-google-maps/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sugar-event-calendar-google-maps/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sugar-event-calendar-google-maps/reviews/)

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 0 replies
 * 1 participant
 * Last reply from: [webelaine](https://wordpress.org/support/users/wpgirl369/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/script-callback-and-sensor-errors/)
 * Status: not resolved