WordPress.org

Ready to get started?Download WordPress

Forums

Pronamic Google Maps
[resolved] Zoom on mashups (6 posts)

  1. erlinghamso
    Member
    Posted 2 years ago #

    First of all thank you for an excellent plugin!

    I just updated the plugin and WordPress to the newest versions (2.1.5 and 3.3), and the zoom on the mashups doesn't seem to work.

    Now they're at max zoom out (I think). Is this a bug, or is there some new syntax?

    Thanks in advance for any help!

    See: http://longboard.no/longboardspots-i-norge/ for an example.

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

  2. Pronamic
    Member
    Plugin Author

    Posted 2 years ago #

    Can you post the code you use to render the Google Maps mashup? From wich version did you upgrade tot 2.1.5?

    There is an option that will fit the map automatically all the markers on the map. You can disable it like this:

    pronamic_google_maps_mashup(array(
    	'post_type' => 'book' ,
    	'posts_per_page' => -1
    ), array(
    	'width' => 800 ,
    	'height' => 800 ,
    	'zoom' => 4 ,
    	'fit_bounds' => false
    ));
  3. erlinghamso
    Member
    Posted 2 years ago #

    Thanks for the reply!

    Sorry for not including the code. It is:

    if(function_exists('pronamic_google_maps_mashup')) {
    						    pronamic_google_maps_mashup(
    						        array(
    						            'post_type' => 'longboard_spot',
    						            'posts_per_page' => '-1',
    						        ) ,
    						        array(
    								'width' => 960 ,
    								'height' => 600 ,
    								'zoom' => 5
    						        )
    						    );
    						}

    It doesn't seem to either fill the map or zoom.

    I'm not sure which version I upgraded from. It was quite old, perhaps 1.7-something.

    Any ideas?

  4. Remco Tolsma
    Member
    Plugin Author

    Posted 2 years ago #

    In version 2.1.6 it isn't possible to set an fixed zoom level for Google Maps mashup, this will be fixed in the next release.

  5. stelam
    Member
    Posted 1 year ago #

    Hi, has this been fixed yet? I'm using 2.2.3 and I still can't seem to set a predefined zoom value:

    if(function_exists('pronamic_google_maps_mashup')) {
        pronamic_google_maps_mashup(
            array(
                'post_type' => 'restaurant',
                'nopaging' => true,
                'posts_per_page' => -1,
                'meta_key' => self::FRANCHISE_META_KEY,
                'meta_value' => 'dropdown_num_2',
            ) ,
            array(
                'width' => $width ,
                'height' => $height ,
                'marker_options' => array(
                    'icon' => asset_url("images/map-marker.png"),
                ),
                'zoom' => $zoom,
                // 'fit_bounds' => false
    
            )
        );
    }

    Whenever I change the value of $zoom, it doesn't change anything on the map

  6. Remco Tolsma
    Member
    Plugin Author

    Posted 1 year ago #

    In the development version it's working for me:

    pronamic_google_maps_mashup(array(
    	'post_type' => 'any' ,
    	'posts_per_page' => -1
    ), array(
    	'width' => 800 ,
    	'height' => 800 ,
    	'map_type_id' => 'satellite' ,
    	'latitude' => 52 ,
    	'longitude' => 5 ,
    	'zoom' => 8 ,
    	'fit_bounds' => false
    ));

    The 'fit_bounds' argument has to be false. You can download the development version from the following page:

    https://github.com/pronamic/wp-pronamic-google-maps/ ยป https://github.com/pronamic/wp-pronamic-google-maps/zipball/master

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic