I'm using this to print out a map in a template:
print $gmap_node;
How do I override the map center and zoom?
I'm thinking something like this:
$mymap = gmap_parse_macro('[gmap|id=viewmap|center=11.111, -22.222|zoom=6]');
$output .= $gmap_draw_map($mymap);
return $output;
...except that gmap_draw_map is deprecated.
Please advise.
Comments
Comment #1
solutionsphp commentedI found this:
http://drupal.org/node/166463
I have the argument handler code inputted, but this alone does not update my map. What type of argument should I select?
Comment #2
ultimikeUsing bdragon's instructions on the link worked for me - just be sure to slap a semi-colon to the end:
$view->gmap_macro = '[gmap |width=500px |height=500px]';I added this to the argument handling code of my view, and it worked fine. You don't have to have an argument defined - just put this code (or whatever you want the macro to be) in the "argument handling code" field.
-mike
Comment #3
rooby commentedDrupal 5 is no longer supported.
If this issue affects drupal 6 or 7 please look for an existing issue for that version or else update this issue accordingly.