Is there a setting in Gmap macro which disables the buttons?
I attached a screenshot which shows the cosmetic issue.

Keep up the good work. The latest Gmap works great with mousezoom! ;-)

CommentFileSizeAuthor
gmap_block.png40.07 KBrokr

Comments

TimDavies’s picture

I've not found a setting, but as I wanted to be able to use the gmap macro in different widths around the site (default width set to 100% so it just fills the space available...) - and as the buttons are needed in some, but get in the way in others, I made a modification to gmap.js in the js/ folder to replace:

map.addControl(new GMapTypeControl());

c. line 99, with:

  mapSize = map.getSize();
  if(mapSize.width > 250) {
     map.addControl(new GMapTypeControl());
  }

which means that when the map is 250px wide or smaller it won't load the buttons, but when it is wider it will...

JohnG-1’s picture

Status: Active » Needs review

That sounds like a very helpful and sensible approach ... I assume that the buttons span 250 pixels or so. I'm going to suggest this be considered as a patch to commit. Hope that's OK with everyone ;-)

bdragon’s picture

Status: Needs review » Postponed (maintainer needs more info)

New behavior flag "notype" added.

Is this good enough for now?

bdragon’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I'm assuming it was good enough.

rokr’s picture

Works fine, thank you. ;-)

greggles’s picture

Can you clarify how this works? Or maybe it's missing from 6.x?

I manually changed a macro on a view block to be [gmap |id=nodemap|center=43,-60|zoom=0|width=200px|height=250px|type=notype] (with type=notype on the end) and it doesn't seem to remove the hybrid/satellite/etc.

greggles’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Closed (fixed) » Active
msielski’s picture

Status: Active » Closed (fixed)

Apparently the notype behavior was removed at some point in the 6.x line. Instead use the mtc setting:

[gmap |id=nodemap|center=43,-60|zoom=0|width=200px|height=250px|mtc=none]

Your mtc options are none, standard, hier, and menu. I haven't tested these but according to Google's documentation standard is the typical three buttons for map type, hier is the same set of buttons with a dropdown menu added, and menu is just the dropdown menu.

This also works in traditional calls like theme('gmap', array('#settings' => $settings));, just make sure there's an 'mtc' => 'none', entry in the $settings array.

msielski’s picture

Status: Closed (fixed) » Active

I should probably let greggles or bdragon close this...

greggles’s picture

Status: Active » Closed (fixed)

I haven't tried it, but that makes sense to me.

Thanks matteusx!

izmeez’s picture

@MatteusX, thanks answer in #8 works great with Drupal 6.x

gabrielu’s picture

Many thanks, There is actually no complete DOC about the settings in theme() function calls for Gmap.
I am using:

gmap_simple_map($lat, $long, $node->type, '', 14, '250px', '170px', true, array('mtc' => 'none'));

and your solution worked by puting:

array('mtc' => 'none')

as $map argument.

dman’s picture

Adding search keywords to this dead issue because I spent 20 minutes searching for this option ...
how to gmap macro remove satellite and legend control overlay
Answer example (as above) :

[gmap |zoom=7 |type=Hybrid |mtc=none ]