[GeoNode-users] Layer Feature info

Amedeo Fadini amefad at gmail.com
Tue Nov 19 01:18:59 PST 2019


Hi Gianluca,
I'm very glad to see you in the list!

Your installation of geonode relies on Geoserver, the simpliest way is to
use freemarker templates.
Read more at this link:

https://docs.geoserver.org/stable/en/user/tutorials/GetFeatureInfo/index.html
https://docs.geoserver.org/stable/en/user/tutorials/freemarker.html#tutorial-freemarkertemplate

You need to prepare the YAML template file and put it into the
<geoserver_data_dir>/workspaces/geonode/<layer_name>
folder,
I guess you can find already existing templates I made searching for *.ftl.
files. By the way  to display the content of  field named "PHOTO" the code
is straightforward:

<img src="http://<your_server_url>/${feature.PHOTO.value}"/>

Of course you can also manage this  parsing the HTML or text response on
the client side,  if you are planning to upgrade to Geonode 2.10 there's
some mapstore  options like outputgrid config [0] (not sure if are natively
included in the geonode edition... could anyone confirm?).

Feel free to contact me even directly if you need specific help on that
installation.

Have a nice day

Amedeo

[0]
https://github.com/geosolutions-it/mapstore/wiki/WMS-Get-Feature-Info-Menu#customize-grid-format-to-display-custom-fields-hide-and-display-them

Il giorno mar 19 nov 2019 alle ore 09:26 Gianluca Zanatta - ABACO S.p.A. <
gianluca.zanatta at abacospa.it> ha scritto:

> Dear all,
>
>
>
>
>
> We are having an issue with the layer feature info: in the layer attribute
> table we have a “photo” field and we need to display it in the layer
> feature info panel when we query the Objects on map.
>
> How is possible to display the photo/image in the layer info panel?
>
>
>
> Thank you for helping.
>
> Cheers,
>
> Gianluca
>
>
>
>
>
>
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geonode-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20191119/dbfaf317/attachment.html>


More information about the geonode-users mailing list