Hi!
I'm working with the Mapstraction CCK module architecture and I've implemented a version which implements all the hook_gis_input() philosophy (disappearance of hook_widget_info() and hook_widget()) and the CCK widget works fine. Now, the problem is hook_widget_settings(), because these hook is not implemented in the geo field module and I can't add the Mapstraction CCK widget configuration page.
I think that a good option to solve this problem would be to implement a hook_widget_settings implementation in the geo field modula which, in the same way of hook_widget(), add the corresponding widget form configuration. Therefore, I should add a new parameter to the hook_gis input info with the config form element.
What do you think about this?
I'm working in the implementation of this soltion.
Thanks

CommentFileSizeAuthor
#1 patch-geo-hook_widget_settings.patch830 bytesplopesc

Comments

plopesc’s picture

Title: Implementation of hook_widget_settings » Implementation of hook_widget_settings()
Category: support » feature
Status: Active » Needs review
StatusFileSize
new830 bytes

Hi!
I've developed a patch for the geo field module. It implements he hook_widget settings() and calls to the corresponding function which contains the own implementation of hook_widget_settings(). The name of the function that implements the hook_widget_settings() is a new hook_gis_input_info array parameter called 'config'. You can see an example below:

/**
 * Implementation of hook_gis_input_info().
 */
function mapstraction_cck_gis_input_info($gis_type = NULL) {
  $inputs = array(
    'mapstraction_cck_geo_field' => array(
      'label' => t('Mapstraction Map'),
      'gis input' => 'wkt',
      'safe reverse' => TRUE,
      'gis types' => array('point', 'linestring', 'polygon'),
      'element' => array(
        '#type' => 'mapstraction_cck_picker',
      ),
      'config' => 'mapstraction_cck_widget_settings',
    ),
  );
  return $inputs;
}

What do you think about this patch for the issue?
Thanks!

allie micka’s picture

Status: Needs review » Closed (duplicate)

Hi there,

Please try to keep issues together - technically, this is a duplicate of #640492: hook_gis_input info() and widgets issues , so it's more helpful to keep it there.