[GeoNode-users] Set size to the info popup in Geoexplorer

Amedeo Fadini amefad at gmail.com
Fri Sep 23 12:37:22 PDT 2016


Here I am.

2016-09-23 16:01 GMT+02:00 Amedeo Fadini <amefad at gmail.com>:
> I've done it....
> You'll find a width property inside the big geoexplorer.js file... its
> somewhere around line 82000.

I'm using the packet version on ubuntu ppa, in my installation inside
the file /static/geoexplorer/script/GeoExplorer.js I found the width
value inside the displayPopup function

Line 80079

Maybe you already know how to use  freemarker templates[0]
I use thtem to show only a list of specific attributes in
getfeatureinfo response.

Based on the standard getfeatureinfo templates [1] I assign a list of
fields to display to a variable and print only the field that is
needed. It's easy to insert link and show pictures inside the info
popup

something like this:

<#assign campi=['id', 'nome', 'descrizione', 'foto_1', 'foto_2']>

<#if !attribute.isGeometry>
   <#if attribute.name?matches("foto_")>
       <a href="/uploaded/img/"+${attribute.value}><img
src="/thumbnails/"+${attribute.value}>
      </a>
   <#else>
   ${campi?seq_contains(attribute.name)?string("<td>${attribute.value}"</td>,
"")}
    </#if>
</#if>

Enjoy!

Amefad

[0]  http://docs.geoserver.org/2.7.0/user/tutorials/freemarker.html
[1] http://docs.geoserver.org/2.7.0/user/tutorials/GetFeatureInfo/index.html#tutorials-getfeatureinfo


More information about the geonode-users mailing list