WordPress.org

Ready to get started?Download WordPress

Forums

Pronamic Google Maps
[resolved] Zoom in on location instead of show all locations? (5 posts)

  1. Ash
    Member
    Posted 1 year ago #

    Great plugin, works as advertised. I'm using it for store locations but when I go to the page I've created for a specific page, the map is zoomed out so that all of the locations show. How can I zoom in to all of them? I tried to add 'zoom' => 14 but it didn't work. Here is how I have it in my theme:

    <?php
    
    if(function_exists('pronamic_google_maps_mashup')) {
        pronamic_google_maps_mashup(
            array(
                'post_type' => 'location'
            ) ,
            array(
                'width' => 414 ,
                'height' => 202 ,
                'marker_options' => array(
                    'icon' => 'http://oil.grassrootonline.com/wp-content/uploads/2013/01/gm-icon.png'
                )
            )
        );
    }
    
    ?>

    http://wordpress.org/extend/plugins/pronamic-google-maps/

  2. Remco Tolsma
    Member
    Plugin Author

    Posted 1 year ago #

    You could try this:

    <?php
    
    if(function_exists('pronamic_google_maps_mashup')) {
        pronamic_google_maps_mashup(
            array(
                'post_type' => 'location'
            ) ,
            array(
                'width' => 414 ,
                'height' => 202 ,
                'marker_options' => array(
                    'icon' => 'http://oil.grassrootonline.com/wp-content/uploads/2013/01/gm-icon.png'
                ),
                'fit_bounds' => false
            )
        );
    }
    
    ?>
  3. Ash
    Member
    Posted 1 year ago #

    Thanks for the quick reply. I did try that but it sends the map into the middle of the ocean:

    http://oil.grassrootonline.com/location/130-colborne-street-west/

  4. Ash
    Member
    Posted 1 year ago #

    I'm not sure why this has been marked resolved, it's not. When I put in fit_bounds = false, my map goes to the middle of the ocean.

  5. Remco Tolsma
    Member
    Plugin Author

    Posted 1 year ago #

    Did you try to set an default latitude and longitude?

    <?php
    
    if(function_exists('pronamic_google_maps_mashup')) {
        pronamic_google_maps_mashup(
            array(
                'post_type' => 'location'
            ) ,
            array(
                'width' => 414 ,
                'height' => 202 ,
                'marker_options' => array(
                    'icon' => 'http://oil.grassrootonline.com/wp-content/uploads/2013/01/gm-icon.png'
                ),
                'fit_bounds' => false,
                'latitude' => 52,
                'longitude' => 5
            )
        );
    }
    
    ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags