Use comma as separator - Mapstore Widgets

110 views
Skip to first unread message
Assigned to bovio....@gmail.com by offth...@gmail.com

Jose Cáceres

unread,
Nov 18, 2020, 11:35:04 AM11/18/20
to mapstore-developers
  Hi everyone,

I'm running Mapbox inside a GeoNode instance as a GIS client, and I have a map that uses the counter widget to track damages caused by Hurricane IOTA in here: https://geoportalouot.unah.edu.hn/maps/147/view

However, the counter uses point as a thousand separator, as seen in the attached picture (mapbox01.png)
Mapbox01.png

The number should be read as three hundred and forty eight thousand people affected. Since we use point as a decimal separator, this may cause some confusion between our users as they may think is  hree hundred and forty eight point...,  and I would like to change the point to a comma.

I found that in the examples shown in the Widget page of mapstore (https://mapstore.readthedocs.io/en/latest/user-guide/widgets/), it uses comma (Mapbox02.png)
Mapbox02.png

But I haven't found where I could make that change.

Any help would be appreciated.

Kind regards,

José

Stefano Bovio

unread,
Mar 4, 2021, 12:03:42 PM3/4/21
to mapstore-...@googlegroups.com
Hi Josè,


I'm running Mapbox inside a GeoNode instance as a GIS client, and I have a map that uses the counter widget to track damages caused by Hurricane IOTA in here: https://geoportalouot.unah.edu.hn/maps/147/view
However, the counter uses point as a thousand separator, as seen in the attached picture 

I took a look to the link you provided and the counters are using comma separator because my browesr is currently set to English language

image.png

it shows dot separator after changing language of the browser to Italian

image.png

The number inside the Counter are formatted based on the localization in use

- CounterView https://github.com/geosolutions-it/MapStore2/blob/2021.01.xx/web/client/components/widgets/widget/CounterView.jsx#L25
- Number https://github.com/geosolutions-it/MapStore2/blob/2021.01.xx/web/client/components/I18N/Number.jsx#L24


The number should be read as three hundred and forty eight thousand people affected. Since we use point as a decimal separator, this may cause some confusion between our users as they may think is  hree hundred and forty eight point...,  and I would like to change the point to a comma.

So it's not currently possible to force a type of format via configuration for the counter because it will take the format based on the locale.

Hope this could help,
Kind Regards,

Stefano


--
You received this message because you are subscribed to the Google Groups "mapstore-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-develo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/mapstore-developers/e194abdf-81f3-4864-a5ad-57742baf5e03n%40googlegroups.com.


--

Regards,

Stefano Bovio

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.

==

Stefano Bovio

Digital Cartographer - UI/UX Designer


GeoSolutions S.A.S.

Via di Montramito 3/A

55054  Massarosa (LU)

Italy

phone: +39 0584 962313

fax:     +39 0584 1660272


http://www.geo-solutions.it

http://twitter.com/geosolutions_it


-------------------------------------------------------


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

Reply all
Reply to author
Forward
0 new messages