Is there a way to disable the map controls in the google maps? i’ve tried zoomcontrol=”false” etc in the shortcode but nothing. Do i need to put the commands in the plugin php itself somewhere?

Ardin Beech
I’d like to hide all of them, if possible.

Ardin Beech
You can just add it straight into the shortcode, but get rid of the quotes ie use zoomcontrol=false
See this page of the documentation for all the options.

Dario
It should also work with the double quotes. The following turns pretty much everything off:
[eo_venue_map venue="fountain-park" height="500px" zoomcontrol="false" streetviewcontrol="false" overviewmapcontrol="false" rotatecontrol="false" overviewmapcontrol="false" maptypecontrol="false" pancontrol="false"]
Note if you are using shortcodes in the visual editor, be sure that the attribute names are not in bold/italic as this does seem to cause problems.

Stephen Harris
I’m adding to code straight to the header with the php echo do_shortcode command. none of the map commands seem to work, however event commands (event_start_before=”next monday”) and width/height etc do.
Basically, i want to use the event map to replace the standard image slider on the site.
-
This reply was modified 11 years, 6 months ago by
Ardin Beech.

Ardin Beech
That also works for me:
<?php echo do_shortcode( '[eo_venue_map ... ]' );?>
But there’s a better (more effecient) way of displaying a map in the template pages: http://codex.wp-event-organiser.com/function-eo_get_venue_map.html
E.g.
<?php echo eo_get_venue_map(
array( 'london-eye', 'edinburgh-castle' ),
array(
'zoomcontrol' => false,
'streetviewcontrol' => false,
'height' => "500px"
)
); ?>
So when you try do_shortcode()
/eo_get_venue_map()
– what happens? Does the map appear, but the options do not take effect? Does the map not apear? How / where are you using those functions?

Stephen Harris
I’m editing the header file in the wordpress editor, and pasting this in, so it replaces the image slider:
<?php echo do_shortcode(‘[event_map event_start_before=”next monday” showpastevents=”false” zoomcontrol=false streetviewcontrol=”false” overviewmapcontrol=”false” rotatecontrol=”false” overviewmapcontrol=”false” maptypecontrol=”false” pancontrol=”false” width=”100%” height=”300px”]’); ?>
Map displays fine, but so do all the controls. It’s not the end of the world if they can’t be disabled. Just thought it would look cleaner.

Ardin Beech
Removing all the quotes makes no difference.
-
This reply was modified 11 years, 6 months ago by
Ardin Beech.

Ardin Beech
Ah, you’re using the event map. Just found that there is a bug with using the (boolean) map properties with that shortcode. I’ll release an update shortly, but the fix is fairly simple. In includes/shortcodes.php
near the top of the function _eventorganiser_event_map_shortcode_handler()
, (line 318), add the following:
//Cast options as boolean:
$bool_options = array('tooltip','scrollwheel','zoomcontrol','rotatecontrol','pancontrol',
'overviewmapcontrol','streetviewcontrol','draggable','maptypecontrol');
foreach( $bool_options as $option ){
if( isset( $atts[$option] ) )
$atts[$option] = ( $atts[$option] == 'false' ? false : true );
}
Those attributes should then work for you.

Stephen Harris
Yes! You’re amazing! Thanks.

Ardin Beech