[GeoNode-devel] Too many digits displayed

Toni Schönbuchner toni.schoenbuchner at csgis.de
Thu Mar 19 04:47:39 PDT 2020

Hi Oliver,

haven't tested by different solutions come to my mind.

a) you could just change your source data
b) you could change the template to your needs check for floats and format:
https://github.com/geosolutions-it/django-mapstore-adapter/blob/master/mapstore2_adapter/plugins/geonode.py#L413 <https://github.com/geosolutions-it/django-mapstore-adapter/blob/master/mapstore2_adapter/plugins/geonode.py#L413>
c) maybe free marker templates could work:
https://docs.geoserver.org/stable/en/user/tutorials/freemarker.html <https://docs.geoserver.org/stable/en/user/tutorials/freemarker.html>
But from what I know they're meant for html output.
d) You could change the feature components of mapstore. Before doing
so I would definitely go with b)

Rounding floats ... sound like a very useful feature. A PR  is very welcome.



> Am 18.03.2020 um 20:00 schrieb geonode-devel-request at lists.osgeo.org:
> Von: EFTAS Oliver Buck <oliver.buck at eftas.com <mailto:oliver.buck at eftas.com>>
> Betreff: [GeoNode-devel] Too many digits displayed
> Datum: 18. März 2020 um 09:41:57 MEZ
> An: "geonode-devel at lists.osgeo.org <mailto:geonode-devel at lists.osgeo.org>" <geonode-devel at lists.osgeo.org <mailto:geonode-devel at lists.osgeo.org>>
> Dear all,
> I was wondering how we can change the display of queried map information.
> If I query one of our maps displaying a raster data set, the attribute information displayed by "clicking" into the map shows something like 10 digits, e,g 0.7642769813537598 How could we limit this to two digits like 0.76
> example layer:
> https://bis-namibia.dev2.eftas.com/layers/geonode:BIS%20Probability%20Map%20Dichrostachys%20cinerea <https://bis-namibia.dev2.eftas.com/layers/geonode:BIS%20Probability%20Map%20Dichrostachys%20cinerea>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20200319/dbc1c089/attachment.html>

More information about the geonode-devel mailing list