Download & Extend

Overlay Feature Attributes

Project:Cartaro
Version:7.x-1.0-beta7
Component:Code
Category:support request
Priority:minor
Assigned:Unassigned
Status:fixed

Issue Summary

I was able to successfully install, and start producing layers utilizing GeoServer WFS; however, I cannot seem to figure out how to enable a popup describing the overlay when the cursor clicks on the overlay polygon. It works for nodes that I have created with GeoFields; however, it will not populate anything for a WFS layer. Thoughts?

Comments

#1

Try to edit the SQL that generates the SQL view for the GeoServer layer and name one column "name" and another one "description" (Administration > Structure > GeoServer > Layers > edit > Layer Specifics > SQL).

See also Theming OpenLayers.

#2

Don't know if IKE0088 accomplish it, but I don't understand where in the SQL query I should name one column "name" and another one "description" , can you please add an example?
Thanks

#3

Here is a SQL query as an example:

DROP VIEW IF EXISTS geoserver_capitals_view;
CREATE VIEW geoserver_capitals_view AS SELECT node.nid as id, node.title as name, field_data_field_location.delta, field_location_geometry, body_value, body_summary as description, body_format
FROM node
LEFT JOIN field_data_field_location ON node.nid = field_data_field_location.entity_id
...

In this case column node.title and body_summary are affected. New Cartaro versions generate these column names by default.

#4

Status:active» closed (fixed)

Closing. Seems there were no more questions left.

#5

Version:7.x-1.0-beta2» 7.x-1.0-beta7
Category:bug report» support request
Priority:normal» minor

Thanks for the clarification. Title and description work perfectly in the new beta, but how to create an node hyperlink in the popup? (as in Switzerland map on demo.cartaro.org)

Any ideas?

#6

Status:closed (fixed)» needs review

#7

Status:needs review» fixed

You can build a hyperlink to the node page, using the id column from the GeoServer layer and a custom theming function. If you have configured URL aliases for nodes, you will need to join the path alias table in the GeoServer SQL configuration.

nobody click here