Seems I can't get the my styles to change. Here is what I have tried.

1. Create an "Location" content type
2. Add a location field of type OpenlayersWKT display with Openlayers Map
3. Create an Open Layers style called "Green Dots"
4. Add a preset - Set all styles to "Green Dots"
5. Go to Display setting for the Location content type and set the location field use the new map preset.
6. Make sure the actual location field is using the new map preset.
7. Enter test data into node
8. View node - shows the default orange dots.

Am I doing something wrong? I am using openlayers-6.x-2.0-alpha6.

Note: I also created a "Purple Dots" style and applied that to a openlayers view and that displays the purple dots correctly.

Let me know if you need more information. Thanks.


First off, you're really better off using the views system rather than the cck system; CCK is kind of a major hack and receives a minority of support and coding love.

So anyway, styles probably aren't working because CCK layers don't exist till they do. Are you seeing the default style (at the bottom of the form, not applied to any specific layer) to Green Dots?

Is the view system an alternative to using the CCK system? I thought that the CCK-system is for collecting geo tags and the view system's job is to display geo tags. To keep things short: CCK is for input and Views is for output.

tmcw, please give me a hint if I'm wrong. Is there a way to use the view system to collect geographic information?

CCK is a decent way to do input of points - Geotaxonomy is alternative, but both are well-supported. However, it also supports output - the display of a map within a node body - and this ability is hard to support in the current OpenLayers infrastructure, and isn't very flexible by design. So, yes, it's really best to use Views to do output and CCK to do input, but CCK can also do output, and that's something that is tricky for this module to support.

Are you seeing the default style (at the bottom of the form, not applied to any specific layer) to Green Dots?

I'm not sure I understand your question completely, but when you view the node it shows the map with the default style(Orange Dots) even though my default preset is set to use a new preset that only uses the "Green Dots" style. I hope that all makes sense.

Thanks for letting me know about using views instead of cck. I will try to create a view with a block display or maybe a display and attach it to the node and see if that works.

The default style as in the style selected here:

In my OpenLayers Default Preset (which is a custom preset) I have all the styles including the "Default style" set to "Green Dot".

Status:Active» Fixed


Both the draw features and CCK vector behaviors were adding vector layers but not running them through the getStyleMap helper function. So, now styles should work on both input and output.

Status:Fixed» Closed (fixed)

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