WordPress.org

Ready to get started?Download WordPress

Forums

Pronamic Google Maps
[resolved] Disable map controlls (9 posts)

  1. c001os
    Member
    Posted 1 year ago #

    Hi!

    Is there a plugin option to disabble map controlls? (zoom, map type controlls)?

    Thanx for the help!

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

  2. c001os
    Member
    Posted 1 year ago #

    Anybody?

  3. Remco Tolsma
    Member
    Plugin Author

    Posted 1 year ago #

    There is no option available in the WordPress admin panel, but you can manage this in the pronamic_google_maps() function call in your theme file.

    pronamic_google_maps( array(
    	'width' => 580,
    	'height' => 150,
    	'map_options' => array(
    		'minZoom' => 10,
    		'maxZoom' => 11,
    		'streetViewControl' => false,
    		'scrollwheel' => false
    	),
    	'marker_options' => array(
    		'icon' => 'http://google-maps-icons.googlecode.com/files/photo.png'
    	)
    ) );

    See for more information about the map options the following page:
    https://developers.google.com/maps/documentation/javascript/reference#MapOptions

  4. c001os
    Member
    Posted 1 year ago #

    Thanx a lot! I give it a try!!!

  5. c001os
    Member
    Posted 1 year ago #

    Sorry but this didnt work! I used your markup, but the controlls still there!

  6. c001os
    Member
    Posted 1 year ago #

    And tried to build your options into my code, but the controlls still there :(

    `if(function_exists('pronamic_google_maps')) {
    pronamic_google_maps( array(
    'width' => 150 ,
    'height' => 125 ,
    'map_options' => array(
    'minZoom' => 10,
    'maxZoom' => 11,
    'streetViewControl' => false,
    'scrollwheel' => false,
    'styles' => array(
    (object) array(
    'featureType' => 'all' ,
    'elementType' => 'all' ,
    'stylers' => array(
    (object) array('weight' => '0.5') ,
    (object) array('saturation' => '-73') ,
    (object) array('hue' => '#007fff')
    )
    )
    )
    )
    ));
    }`

  7. c001os
    Member
    Posted 1 year ago #

    Allright! I managed it! The key was this 2 attribute:

    'navigationControl' => false,
    'mapTypeControl' => false,

    Thanx a lot!

  8. Remco Tolsma
    Member
    Plugin Author

    Posted 1 year ago #

  9. c001os
    Member
    Posted 1 year ago #

    Great!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic