WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Zoom in on location instead of show all locations?

[Resolved] Zoom in on location instead of show all locations?

  • 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/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Remco Tolsma

    @remcotolsma

    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
            )
        );
    }
    
    ?>

    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/

    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.

    Plugin Author Remco Tolsma

    @remcotolsma

    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
            )
        );
    }
    
    ?>
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Zoom in on location instead of show all locations?’ is closed to new replies.