google is not defined ( 404 )
-
I’m getting a 404 google is not defined
The generated URL is:
http://maps.google.com/maps/api/js/?language=en®ion=ca&key=my_key&libraries=places&v=3.36&ver=2.2.231If I add the following:
add_filter( 'wpsl_gmap_api_params', 'custom_gmap_api_params' ); function custom_gmap_api_params( $api_params ) { $api_params = $api_params .'&key=TEST'; return $api_params; }I can confirm that the query string is modified, and this is the path from the plugin.
I looked into the API path and it should be.
http://maps.googleapis.com/maps/api/js and not http://maps.google.com/maps/api/js/
Change
google.comtogoogleapis.comand remove the trailing slash afterjs/This fix needs to be applied to the
class-admin.phpLoog for and change:
wp_enqueue_script( ‘wpsl-gmap’, ( ‘//maps.google.com/maps/api/js/’ . wpsl_get_gmap_api_params( ‘browser_key’ ) ), false, WPSL_VERSION_NUM, true );to
wp_enqueue_script( 'wpsl-gmap', ( '//maps.googleapis.com/maps/api/js' . wpsl_get_gmap_api_params( 'browser_key' ) ), false, WPSL_VERSION_NUM, true );Hope this can be updated soon! 🙂
The topic ‘google is not defined ( 404 )’ is closed to new replies.