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
Comment #1
tmcw CreditAttribution: tmcw commentedNot 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.
Comment #2
Amir Simantov CreditAttribution: Amir Simantov commentedThanks for the fast reply.
Just in case, I have tried unchecking all checkboxes under the Draw Features - no help.
Comment #3
pokadan CreditAttribution: pokadan commentedIt 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
Comment #4
tmcw CreditAttribution: tmcw commentedI'm relatively sure that this isn't the case. Nontheless, if you can do more debugging, that'd be very useful.
Comment #5
Amir Simantov CreditAttribution: Amir Simantov commentedThanks #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.
Comment #6
tmcw CreditAttribution: tmcw commentedComment #7
zzolo CreditAttribution: zzolo commentedI 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)?
Comment #8
Amir Simantov CreditAttribution: Amir Simantov commentedWill do in the coming days, can't right now. Thanks!
Comment #9
zzolo CreditAttribution: zzolo commentedComment #10
tmcw CreditAttribution: tmcw commentedAny luck testing this?
Comment #11
tmcw CreditAttribution: tmcw commentedClosing, this is very stale. Reopen if the problem continues with newer versions of OpenLayers.