Discussion:
[mapguide-users] MGOS 3.1.1 Data Presentation in the Properties Pane (Fusion)
MHerel
2018-08-02 19:07:37 UTC
Permalink
Hello,

We have just upgraded from MGOS 2.5 to 3.1.1 and have noticed a difference
in how dates and decimal data are displayed in the Properties Pane using the
Fusion viewer and the King Oracle provider.

Previously dates displayed as 26 9 2012 but now it displays 2012-09-26
13:56:54
Previously decimals displayed as 5000.00 and now as 5000.00000002
(something like this - from memory)

How are these controlled? Is there an NLS setting that can be applied in
the King provider? Is it dependent on the database NLS settings? Fusion?

Any help would be appreciated.

Mike



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Jackie Ng
2018-08-03 09:59:03 UTC
Permalink
Do the feature property values over the wire (ie. The XML/JSON responses when
you open your browser dev tools) look the same as they did in Fusion (circa
MGOS 2.5)?

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Mike Herel
2018-08-03 13:55:32 UTC
Permalink
Hi Jackie,

The data comes back in 2.5 via Selection.php and has the date/time as
displayed in the Properties Pane "5.4.2010" (Just date as we want when
there is not time component).
The JSON data structure looks different coming from 3.1.1 and comes back
via mapagent.fcgi and has the date as "2010-04-05 00:00:00"

I hope this is what you were asking for.

Each of these point to their own Oracle 12 instance which are supposed to
be identical. I will point my 3.1.1 installation to the same database as
out 2.5 installation just to be sure.

Thanks for your help,

Mike
Post by Jackie Ng
Do the feature property values over the wire (ie. The XML/JSON responses when
you open your browser dev tools) look the same as they did in Fusion (circa
MGOS 2.5)?
- Jackie
--
http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Jackie Ng
2018-08-15 12:19:35 UTC
Permalink
Ok, this is the "problem"

In MGOS 2.5 and older, Fusion hits several sets of PHP scripts to get
selection properties (one of which being Selection.php)

From 2.6 onwards, as part of optmizing the roundtrip of viewer selections,
we made a enhanced version of QUERYMAPFEATURES in the mapagent and modified
Fusion to hit that instead.

However, the mapagent serves datetime values over the wire in a
locale-neutral format (yyyy-mm-dd hh:mm:ss). Fusion has no date/time
formatting specifics in the selection panel so it displayed such date/time
values as-is.

Selection.php in Fusion must've taken server locale into consideration when
it wrote out its datetime values.

The easiest solution I can think of is to introduce a new startup hook in
Fusion that lets you customize the date/time display formatting.

So in your template, you'd call something like this before the main
Fusion.initialize():

Fusion.SelectionPanel.setDateTimeFormatter(function(dateStr) {
//dateStr will be in yyyy-mm-dd hh:mm:ss
//return a formatted version to your liking
});

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Mike Herel
2018-08-21 18:07:51 UTC
Permalink
Thanks Jackie,

I gave this a try without any luck. It seems Fusion.SelectionPanel is
undefined and I don't see any way to access the SelectionPanel. I think I
should be OK with writing the code inside the function, I just need help
getting hooked into the right place.

Thanks
Post by Jackie Ng
Ok, this is the "problem"
In MGOS 2.5 and older, Fusion hits several sets of PHP scripts to get
selection properties (one of which being Selection.php)
From 2.6 onwards, as part of optmizing the roundtrip of viewer selections,
we made a enhanced version of QUERYMAPFEATURES in the mapagent and modified
Fusion to hit that instead.
However, the mapagent serves datetime values over the wire in a
locale-neutral format (yyyy-mm-dd hh:mm:ss). Fusion has no date/time
formatting specifics in the selection panel so it displayed such date/time
values as-is.
Selection.php in Fusion must've taken server locale into consideration when
it wrote out its datetime values.
The easiest solution I can think of is to introduce a new startup hook in
Fusion that lets you customize the date/time display formatting.
So in your template, you'd call something like this before the main
Fusion.SelectionPanel.setDateTimeFormatter(function(dateStr) {
//dateStr will be in yyyy-mm-dd hh:mm:ss
//return a formatted version to your liking
});
- Jackie
--
http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Jackie Ng
2018-08-22 12:37:16 UTC
Permalink
Just for clarification.

It's something I'm planning to do, not something that has been done yet:

https://trac.osgeo.org/fusion/ticket/663

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
MHerel
2018-09-04 16:51:41 UTC
Permalink
This is great news. I suppose there will also be a fix for how fixed decimal
data types will be displayed as well?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Loading...