• I’m trying to get a map with all the posts for a custom post type called “dialisys_center” and I’ve implemented my own shortcode to achieve this using the wpgep_map() function with a custom $query array, like this:

    /* Full map shortcode */
    add_shortcode( 'dialisys_map', 'dialisys_map' );
    function dialisys_map() {
    	if (class_exists('WPGeo')) {
    		$wp_geo_options = get_option( 'wp_geo_options' );
    		$query = array(
    			'post_type'		=>	'dialisys_center'
    		);
    		ob_start();
    		wpgeo_map( $query );
    		return ob_get_clean();
    	} else {
    		return '<p>WPGeo not present</p>';
    	}
    }

    I’m getting “google is not defined” on google.maps.event.addDomListener(window, "load", wpgeo_render_maps);

    Seems like the Google Maps API is not being loaded.
    Any ideas why?

    https://www.ads-software.com/plugins/wp-geo/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘"google is not defined" on map for custom post type’ is closed to new replies.