In the tutorial "data source" fieldset is shown. I added both float lat/lon and WKT fields to the view and can't see this fieldset anyway. Node with coordinates and WKT map won't show up in this view.

Comments

fasdalf@fasdalf.ru’s picture

StatusFileSize
new8.86 KB

approvement

zzolo’s picture

Category: bug » support

You need to set up at least two separate Views, a Data view and a display View. The image you have attached is from the Display view.

http://drupal.org/node/627816

fasdalf@fasdalf.ru’s picture

StatusFileSize
new5.98 KB

Thank you. You absolutely right. Now i have a view almost like in tutorial. It just uses WKT instead of lat/lon floats.
Default view shows me story with title and WKT point-and-polygon map. View is saved, but i can't see point nor polygon on default map. There is no data overlay in layer selector. A zoomed place where polygon shold be down to 17 level and it markers did not appear.
What am i doing wrong?

View export attached.

tmcw’s picture

Have you added the data layer to the preset?

fasdalf@fasdalf.ru’s picture

Now I can see it in layers selection. I've tried Default and Default Select styles, but markers themself do not appear anyway.
thank you for your patience in advance.

fasdalf@fasdalf.ru’s picture

Title: views style "data source" fieldset missing » Views' WKT data don't show up in layers

I changed data source form WKT to lat/lon pair and everything works now. For example if i activate "zoom to layer" option it works if data source set to lat/lon but not to WKT. Also lat/lon data do show up on layer.
Do i need to do something else to see WKT maps in view?

tom_o_t’s picture

Has anyone got nodes with WKT locations to display on a view?

I can't tell if I've got my configuration wrong, or if this feature is just not supported yet by the openlayers module. If it's not supported yet I'll start trying to put together a patch.

tom_o_t’s picture

Status: Active » Fixed

Figured it out, as I suspected, it was user error (me).

As is written in the tutorial:

The OpenLayers Data view queries nodes, or data, or users, and knows what field is a latitude/longitude field or WKT. You’ll never access the Data view directly, instead, presets call them and take their data when the Map view is called.

The step I'd missed was editing the map preset (admin/build/openlayers/presets) and adding the view as a layer. It's very different to how the gmap module integrates with views.

I'm thinking about presenting on OpenLayers at the upcoming DrupalCampNYC, so will probably put together a screencast or more detailed step-by-step guide to this to avoid other people making the same mistake I did.

Status: Fixed » Closed (fixed)

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

tommy kaneko’s picture

I am having difficulties getting it to work on WKT also. I have got the layer with the latitude/longitude working fine. But there is vector data for the node which is in a WKT format. I've checked that views is seeing the WKT data, and the layer with the WKT data is switchable. It just doesn't seem to be visible! Anyone have an idea?

Many thanks

tmcw’s picture

Tommy: is this site live somewhere? Can you elaborate any more? Otherwise it's very difficult to debug this problem.

tommy kaneko’s picture

StatusFileSize
new34.73 KB
new67.06 KB
new57.64 KB

Yes, sorry about that. Below is a temporary URL that I have opened up (at the moment, my site is in maintenance mode most of the time).
http://consensuswiki.org/map

Right now, the location module's CCK field provides longitude and latitude info which renders correctly (that's the layer you can see), but on the same nodes, there are Openlayers WKT CCK fields (with vector data), which look fine on the page ( http://consensuswiki.org/project/beginners-tutorial ), but do not render on the views version on the URL above, although the layer "project mapping" is selectable.

Going into firebug, I can see that the svg element with the id="OpenLayers.Layer.Vector_14_svgRoot", is empty, which corresponds to the "project mapping" layer. I've also attached a screenshot of:
1. the views page that passes the WKT data onto Openlayers
2. part 1 of the behaviours page in the Openlayers preset
3. part 2 of the behaviours page in the Openlayers preset

Thank you for your help on this. I really appreciate it.

tommy kaneko’s picture

I can confirm that my issue is a duplicate of this one here: http://drupal.org/node/940574