• Resolved Ash

    (@ashgotti)


    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' => 'https://oil.grassrootonline.com/wp-content/uploads/2013/01/gm-icon.png'
                )
            )
        );
    }
    
    ?>

    https://www.ads-software.com/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' => 'https://oil.grassrootonline.com/wp-content/uploads/2013/01/gm-icon.png'
                ),
                'fit_bounds' => false
            )
        );
    }
    
    ?>
    Thread Starter Ash

    (@ashgotti)

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

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

    Thread Starter Ash

    (@ashgotti)

    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' => 'https://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 ‘Zoom in on location instead of show all locations?’ is closed to new replies.