I am not sure if it should be a bug report, feature request or support request really. I noticed that when I set an url in a text field az an openlayers style, than the displaying image has 0.4 opacity. When I set the icon style from an image field, it has opacity 1. I think it would be logical to use the default style settings for any url, whether it comes from a text field or an image field.

Comments

bossmac’s picture

Hi

Im also looking for this. temporarily i modifed the code of modules/openlayers/modules/openlayers_views/views/openlayers_views_style_data.inc

function get_style($feature, $handlers, $datasource, $record) {
    $style = NULL;

    if (isset($datasource['style_field']) && !empty($datasource['style_field'])) {
      $style_field = $handlers[$datasource['style_field']];
      // Check if field is not empty
      if ($style_field->original_value) {
        $style = $style_field->options['settings'];

        if ($style_field->original_value) {
          $image_info = image_get_info($style_field->original_value);
          $style['graphicWidth'] = $image_info['width'];
          $style['graphicHeight'] = $image_info['height'];

          unset($style['imageStyle']);
          $style['externalGraphic'] = file_create_url($style_field->original_value);
        }
		$style['fillOpacity'] = 1;
        foreach ($style as $prop => $value) {
          if (is_numeric($value)) {
            $style[$prop] = (float) $value;
          }
          if (empty($value)) {
            unset($style[$prop]);
          }
        }
      }
    }
    return $style;
  }

i put some style property

$style['fillOpacity'] = 1;