Hello, ive read tons of the posts about this issue and i still cant quite get it..

im embedding my gmap view block directly into a .tpl file

  $view_args = array($node->nid);
  $display_id = 'block';
  $view = views_get_view('potspot_map');
  
  if (!empty($view)) {
    print $view->execute_display($display_id , $view_args);
  } 

also- in the view, i have an argument set up (ive tried both with and without) for the node id

its showing the correct location marker, just not centering in on it.. its centering on the infamous Wendover

the code snippets in the other posts about this issue dont look the same as the actual code of the gmap_location.module

thanks for any help!

Comments

String Monkey Media’s picture

Subscribing

jdeg’s picture

Category: support » bug
Priority: Normal » Major

I have the same problem here. Some can help?

Thanks!

jdeg’s picture

I already solved the problem searching a little bit, here are the answers:

http://drupal.org/node/517560#comment-3921966
http://drupal.org/node/718928#comment-3162664

Basically you have to create the "Global: Null" argument and selected in style of the gmap settings of the view.

r.aubin’s picture

---
7.x
---
For anyone looking to center the map on the row results and not on an argument/contextual filter, try this. Under gmap Format settings in your Views edit screen, alter the gmap macro to include:

behavior=+autozoom

So for example, the macro may look like this if no other customizations are made:

[gmap behavior=+autozoom]