Hi, I try to use openlayers with geo_cck. OL provide a way to display a geo_cck point on a map which is nice. Though is there a way to get the map center on the point displayed?

Comments

tmcw’s picture

Have you tried the zoomToFeature or zoomToLayer behaviors?

ec’s picture

Unfortunaly I can't see this setting? Where is it suppose to be? Thanks.

zzolo’s picture

There is the ability to Zoom to Features with a Views Map in 1.x. If you need to do this outside Views, you will have to create a map preset in a module that has this feature defined, as this is difficult in the preset in interface.

zzolo’s picture

Status: Active » Fixed

I actually just put in the zoom to layer behavior into cck fields (which is an option in the widget form).
http://drupal.org/cvs?commit=330128

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Component: OpenLayers Behaviors » OpenLayers API

Please excuse my ignorance, I'm using 6.x-2.0-alpha4 and don't see this feature. I'm struggling to follow the roadmap is 6.x-2 an improvement on 6.x-1? I would like to automatically zoom to features added to a map, has, or will, the solution @zzolo mentions in #4 been/be added to 6.x-2.0-alpha4? Thanks!

Anonymous’s picture

Ah, ignore me, I just found discussions on adding this feature to the 6.x-2 branch here: http://drupal.org/node/764340. Cheers.