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

friedjoff’s picture

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.

mtoscano’s picture

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

friedjoff’s picture

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.

ulim’s picture

Status: Active » Closed (fixed)

Closing. Seems there were no more questions left.

kaladatsch’s picture

Version: 7.x-1.0-beta2 » 7.x-1.0-beta7
Category: bug » support
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?

kaladatsch’s picture

Status: Closed (fixed) » Needs review
friedjoff’s picture

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.

Status: Fixed » Closed (fixed)

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

rinckoar’s picture

rinckoar’s picture

Issue summary: View changes

Hi, can I use more than one column in description? if the answer is yes, can you tell me how please?. Thanks