[mapguide-users] MGOS 3.1.1 Data Presentation in the Properties Pane (Fusion)

Jackie Ng jumpinjackie at gmail.com
Wed Aug 15 05:19:35 PDT 2018


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


More information about the mapguide-users mailing list