I am not sure whether this relate to the Behavior component or the the CCK one.

I am using the CCK WKT field with a preset letting use the Point behavior. However, when adding a new node, although yhe right preset is used, there is no button on the right hand side with the pointing icon (or polygon or line).

The Feature Type "Point" is enables for the field, and follows is the values for the preset.

Thanks for any help!

$items = array();
$openlayers_presets = new stdClass;
$openlayers_presets->disabled = FALSE; /* Edit this to true to make a default openlayers_presets disabled initially */
$openlayers_presets->api_version = 1;
$openlayers_presets->name = 'ol_preset_normal';
$openlayers_presets->title = 'Normal Map Preset';
$openlayers_presets->description = 'Jerusalem city';
$openlayers_presets->data = array(
'width' => 'auto',
'height' => '400px',
'image_path' => '',
'css_path' => '',
'proxy_host' => '',
'center' => array(
'initial' => array(
'centerpoint' => '35.217819459559, 31.771417207973',
'zoom' => '14',
),
'restrict' => array(
'restrictextent' => 0,
'restrictedExtent' => '',
),
),
'behaviors' => array(
'openlayers_behavior_attribution' => array(),
'openlayers_behavior_popup' => array(),
'openlayers_behavior_keyboarddefaults' => array(),
'openlayers_behavior_layerswitcher' => array(),
'openlayers_behavior_mouseposition' => array(),
'openlayers_behavior_navigation' => array(
'zoomWheelEnabled' => 1,
),
'openlayers_behavior_dragpan' => array(),
'openlayers_behavior_panzoom' => array(),
'openlayers_behavior_panzoombar' => array(),
'openlayers_behavior_drawfeatures' => array(
'feature_types' => array(
'point' => 'point',
'path' => 0,
'polygon' => 0,
),
'element_id' => '',
),
),
'default_layer' => 'osm_mapnik',
'layers' => array(
'osm_mapnik' => 'osm_mapnik',
),
'layer_styles' => array(),
'layer_activated' => array(),
'layer_switcher' => array(),
'projection' => '900913',
'displayProjection' => '4326',
'styles' => array(
'default' => 'default',
'select' => 'default',
'temporary' => 'default',
),
'options' => NULL,
);
$items["ol_preset_normal"] = $openlayers_map_presets;
return $items;

Comments

tmcw’s picture

Not sure why your case isn't working, but one big thing is that you don't need to manually add the drawfeatures behavior onto a preset to use it for CCK input. The OpenLayers CCK module will add and configure the behavior automatically.

Amir Simantov’s picture

Thanks for the fast reply.

Just in case, I have tried unchecking all checkboxes under the Draw Features - no help.

pokadan’s picture

It works only if OpenLayers Default Preset is set to that preset on admin/build/openlayers.
Pretty serious bug to be limited to one (default) preset.
This happens for 6.x-2.0-alpha7; haven't tried it for 6.x-2.x-dev

tmcw’s picture

Component: Behaviors » OpenLayers CCK

It works only if OpenLayers Default Preset is set to that preset on admin/build/openlayers.
Pretty serious bug to be limited to one (default) preset.

I'm relatively sure that this isn't the case. Nontheless, if you can do more debugging, that'd be very useful.

Amir Simantov’s picture

Thanks #3, this really made the trick. However, what if I would like to use another preset? Only one preset can be set as a default, of course.

tmcw’s picture

Title: Cannot make the pointing behavior work » CCK breaks with non-default-set preset
Category: support » bug
zzolo’s picture

I just tested this in the dev version and it seems to work fine. Can you re-test with alpha8 (which is pretty close to head as it was just released)?

Amir Simantov’s picture

Will do in the coming days, can't right now. Thanks!

zzolo’s picture

Category: bug » support
tmcw’s picture

Version: 6.x-2.0-alpha7 » 6.x-2.x-dev

Any luck testing this?

tmcw’s picture

Status: Active » Closed (works as designed)

Closing, this is very stale. Reopen if the problem continues with newer versions of OpenLayers.