WordPress.org

Plugin Directory

Pronamic Google Maps

This plugin makes it easy to add Google Maps to your WordPress post, pages or other custom post types.

Extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.

You should add some code to you templates to add the Google Map.

Dynamic Google Maps

<?php

if ( function_exists( 'pronamic_google_maps' ) ) {
    pronamic_google_maps( array(
        'width'  => 290,
        'height' => 200 
    ) );
}

?>

Static Google Maps

<?php

if ( function_exists( 'pronamic_google_maps' ) ) {
    pronamic_google_maps( array(
        'width'  => 290,
        'height' => 200,
        'static' => true,
        'color'  => '0xFFD800',
        'label'  => 'M'
    ) );
}

?>

Filter the_content()

<?php

if ( function_exists( 'pronamic_google_maps' ) ) {
    function custom_pronamic_google_maps_the_content( $content ) {
        $content .= pronamic_google_maps( array(
            'width'  => 500,
            'height' => 500,
            'echo'   => false
        ) );

        return $content;
    }

    add_filter( 'the_content', 'custom_pronamic_google_maps_the_content', 9 );
}

?>

Google Maps Mashup

<?php

if ( function_exists( 'pronamic_google_maps_mashup' ) ) {
    pronamic_google_maps_mashup(
        array(
            'post_type' => 'post'
        ), 
        array(
            'width'          => 300,
            'height'         => 200, 
            'nopaging'       => true,
            'map_type_id'    => 'satellite', 
            'marker_options' => array(
                'icon' => 'http://google-maps-icons.googlecode.com/files/photo.png'
            )
        )
    );
}

?>

Microformat

If you want to display the GEO microformat with the latitude and longitude information you should call the following function in your template:

<?php pronamic_google_maps_geo_microformat(); ?>

Or througt an filter

<?php

function custom_pronamic_google_maps_the_content( $content ) {
    $content .= pronamic_google_maps( array(
        'width'  => 500 , 
        'height' => 500 , 
        'echo'   => false
    ) );

    $content .= pronamic_google_maps_geo_microformat( array(
        'echo' => false
    ) );

    return $content;
}

add_filter( 'the_content', 'custom_pronamic_google_maps_the_content', 9 );

Requires: 3.0 or higher
Compatible up to: 3.9.6
Last Updated: 2014-5-15
Active Installs: 10,000+

Ratings

4.7 out of 5 stars

Support

1 of 4 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,2,2 0,1,0 0,1,0 0,1,0 0,2,0
100,2,2 100,2,2 50,2,1 100,1,1 50,4,2 0,1,0 100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
0,1,0 100,1,1 100,1,1 100,2,2 0,1,0 100,2,2 100,2,2
100,1,1
100,1,1 100,1,1
0,2,0 100,1,1 0,1,0
100,1,1
100,3,3 50,4,2 100,1,1 0,1,0 100,4,4 100,3,3 100,1,1
100,10,10
100,2,2 100,1,1 0,1,0
0,1,0 100,2,2
100,3,3
100,2,2
100,1,1
0,1,0 100,2,2
100,2,2
100,1,1 50,2,1
0,1,0 100,1,1 50,2,1
0,1,0
100,1,1 50,2,1
100,1,1
100,1,1
100,1,1
100,1,1