I'm having trouble with the locations module. For openlayers views, it will display locations if "non-cck" location fields is used but if I have a location cck on a node, it won't display the location. Has anyone gotten location cck fields to work with openlayer views?

CommentFileSizeAuthor
#13 Location Current Coordinates.jpg29.46 KBitserich
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Summit’s picture

Subscribing, greetings, Martijn

phayes’s picture

Version: 6.x-1.0-beta4 » 6.x-1.x-dev
phayes’s picture

Category: bug » support

I would say this is a bug / feature request for location CCK. I couldn't even manage to save a lat / lon field using location CCK, so it seems pretty broken.

On the views side, it does not appear that location CCK exposes individual data pieces individually (lat, lon, city, country etc.) - so we have nothing to map on. Once location CCK has these exposed individually, you should be able to add lat and lon as fields, then map on those. In the mean time, you could use node location (no-cck), which does expose lat / lon individually to views.

phayes’s picture

My apologies. I see we have Location CCK field as an option to map from.. This is left-over functionality that was never implemented and should be removed. The way forward is to map to individual lat / lon fields that need to be exposed as fields explicitly..

phayes’s picture

Commited - I've removed the dangling confusing user-interface: http://drupal.org/cvs?commit=326610

phayes’s picture

And the relevant location issue that needs to be fixed: http://drupal.org/node/698240

zzolo’s picture

Status: Active » Postponed

MArking as postponed. This would be a good feature to have, but don't want it to stop the 1.0.

zzolo’s picture

In theory, if Location add support to use individual piece of data, then we already have support for arbitrary lat and lon, so there is nothing really for us to do?

phayes’s picture

Status: Postponed » Closed (won't fix)

zzolo,

yes exactly, so marking as won't fix as this is really a location issue.

phayes’s picture

Here is a workaround until the location issue is addressed: http://geomemes.com/node/78

kbk’s picture

Just curious. Has the issue with Location CCK Fields been resolved?

tmcw’s picture

It looks like the issue that this refers to is not fixed (and the 1.x branch is abandoned), so no.

itserich’s picture

@: phayes # 10

That is an interesting article you cite.

I am trying to follow it but for computed wkt this is not displayed during the node data output:

&$node->locations[0]['locpick']['user_latitude'] 

I can see Current coordinates with latitude and longitude when the node is edited but I don't see the field output. Attached is a screen shot of the node edit.

Any help is appreciated, I have spent so much time on location modules.

itserich’s picture

Okay I figured it out.

Openlayers Geocoder meets my needs. Took me 12 hours to think of it and 10 minutes to find it works.