Hi,

I'm not sure I'm well understanding all the javascript of gmap module, but i'm trying to modify the height of my Gmap dynamicly.

I saw that there's "obj.bind("heightchange", function (h) { ... }" in gmap.js, and if I'm understanding this line that mean that I can trigger an event that's called "heightchange", with one parameter for the new height.

But with :
Drupal.gmap.getMap('my_gmap').change('heightchange', '1000px');

I have a js error : "Result of expression 'obj.map' [undefined] is not an object. line 195 gmap.js".

Is this normal ? (I checked and Drupal.gmap.getMap('my_gmap') returing an object that's not undefined).

Thanks.

Comments

magicyril’s picture

It's working with a simple : $('selector for the right div).height(the_height); but is it as clean as doing with the gmap event ?

bdragon’s picture

The second parameter of change() is the binding, not the userdata.

Drupal.gmap.getMap('my_gmap').change('heightchange', -1, '1000px');

Does this make it work for you?

rooby’s picture

Status: Active » Closed (cannot reproduce)

Closing due to no response to #2".

Please reopen if this is still an issue.