I have 2 geo fields on a node. Both show a wkt just fine on the node, but when both are on filled out and told to show in views... one wont show in a views map. That 'one' wont even show if I try to have it display by itself. As soon as I delete the other field from that content type... it will show.

Better described:

I have this
Content type TEST
field_test1 - a Geospatial field with an openlayers map single point select - not required
field_test2 - same as test1... (i've tried this as a gmap picker also... same problem... )

I fill out a node with a point in both fields... the node shows the wkt of both of them.

Just to be sure, I create a second content called TESTER with one field called field_tester... this is set the same as the previous fields.

I create an unformatted view... it will show all the fields...
I turn that view into an openlayers map using geo module and specifying field_tester as the field to use... it shows up just fine on the map.
I then make it show both field_tester and field_test2... both show up just fine.
I then make it show all 3 fields... field_test1 does not show.
I deselect all but field_test1 and nothing shows... just blank map

I remove the field field_test2 completely from the content type and field_test1 will now show in a map.

I'm using latest dev in geo and openlayers (not HEAD in openlayers though b/c it seems behind).
I hope thats enough info :).

Thanks

Comments

phayes’s picture

Assigned: phayes » Unassigned
Status: Active » Closed (won't fix)

This is a bug in geo: http://drupal.org/node/446754 no it's not. :-)

If you disable 'group multiple values' for the field in the view, you can get this to work for now. Hopefully the geo bug will be fixed soonish.

phayes’s picture

Assigned: Unassigned » phayes

Ooops. I just re-read this and realized this isn't the same bug. Sorry for the confusion. I will look into this.

that0n3guy’s picture

Thanks for responding so fast... that amazing :)

phayes’s picture

Status: Closed (won't fix) » Active

This one is very very strange - I can't seem to figure it out.

1. This bug is also present in openlayers_wkt fields - so two openlayers_wkt fields in the same node also won't work.

2. When viewing things as a table everything looks fine. Both fields appear fine in the view.

3. When using an openlayers map view, if I do a var_dump of $this->view->result right at the very beginning of the render() function, one of the fields is missing (the bug). So it doesn't seem to be a problem in the implementation of our view stylemap, since views itself *appears* not to be returning the field. I'm almost inclined to say it's a bug in views, although this seems very unlikely.

4. Again it works fine in a table view, so it's likely not openlayes_cck.

I don't get it. Anyone else want to try?

that0n3guy’s picture

1. This bug is also present in openlayers_wkt fields - so two openlayers_wkt fields in the same node also won't work.

I noticed this yesterday also... but I forgot to mention it :)...

that0n3guy’s picture

Here is something I noticed... (maybe has nothing to do with this and is just me not knowing whats going on but....).

Here is the view query:
(oh... my first field is called field_testgeo and second is field_testgeo2. field_testgeo2 is showing, field_testgeo is not.)

SELECT node.nid AS nid,
   node.title AS node_title,
   node_data_field_testgeo2.field_testgeo2_geo AS node_data_field_testgeo2_field_testgeo2_geo,
   node.type AS node_type,
   node.vid AS node_vid,
    SRID(node_data_field_testgeo2.field_testgeo2_geo) as node_data_field_testgeo2_field_testgeo2_srid, 
    AsBinary(node_data_field_testgeo2.field_testgeo2_geo) AS node_data_field_testgeo2_field_testgeo2_wkb,
    AsBinary(Envelope(node_data_field_testgeo2.field_testgeo2_geo)) AS node_data_field_testgeo2_field_testgeo2_bbox,
    AsBinary(Centroid(node_data_field_testgeo2.field_testgeo2_geo)) AS node_data_field_testgeo2_field_testgeo2_centroid,
   node_data_field_testgeo2.field_testgeo_geo AS node_data_field_testgeo2_field_testgeo_geo,
    SRID(node_data_field_testgeo2.field_testgeo_geo) as node_data_field_testgeo2_field_testgeo_srid, 
    AsBinary(node_data_field_testgeo2.field_testgeo_geo) AS node_data_field_testgeo2_field_testgeo_wkb,
    AsBinary(Envelope(node_data_field_testgeo2.field_testgeo_geo)) AS node_data_field_testgeo2_field_testgeo_bbox,
    AsBinary(Centroid(node_data_field_testgeo2.field_testgeo_geo)) AS node_data_field_testgeo2_field_testgeo_centroid,
   node_data_field_geotestdiff.field_geotestdiff_geo AS node_data_field_geotestdiff_field_geotestdiff_geo,
    SRID(node_data_field_geotestdiff.field_geotestdiff_geo) as node_data_field_geotestdiff_field_geotestdiff_srid, 
    AsBinary(node_data_field_geotestdiff.field_geotestdiff_geo) AS node_data_field_geotestdiff_field_geotestdiff_wkb,
    AsBinary(Envelope(node_data_field_geotestdiff.field_geotestdiff_geo)) AS node_data_field_geotestdiff_field_geotestdiff_bbox,
    AsBinary(Centroid(node_data_field_geotestdiff.field_geotestdiff_geo)) AS node_data_field_geotestdiff_field_geotestdiff_centroid
 FROM node node 
 LEFT JOIN content_type_flowtest_2 node_data_field_testgeo2 ON node.vid = node_data_field_testgeo2.vid
 LEFT JOIN content_type_flowtest_1 node_data_field_geotestdiff ON node.vid = node_data_field_geotestdiff.vid
 WHERE node.status <> 0
 GROUP BY nid, node_title, node_data_field_testgeo2_field_testgeo2_geo, node_type, node_vid, node_data_field_testgeo2_field_testgeo_geo, node_data_field_geotestdiff_field_geotestdiff_geo

I noticed that it uses node_data_field_testgeo2.field_testgeo2_geo for the 2nd field and node_data_field_testgeo2.field_testgeo_geo for the 1st field....

Shouldnt this be node_data_field_testgeo.field_testgeo_geo

that0n3guy’s picture

I thought of a way around this... kinda a hack.

In the settings for openlayers in views, if I could select both a geo field and an 'Other: Well Known Text' field. I could use 2 different fields (a geospacial and openlayer cckfields) and maybe the 2 different field types would work together.

Is it possible to change the code to allow for both geo and "Other:.." fields to be selected?

phayes’s picture

that0n3guy’s picture

Awesome,

Thanks!

Status: Fixed » Closed (fixed)

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