Would a data link fix UNIX timestamp in MapTip issue?
I posted about this a month ago and I’ve done a little more research since then. For reference, here’s the original post
I have a graves feature service in a cemetery editing application with a related burials table. This table has date fields that are formatting in the feature description as Unix timestamps like the following - Date of Death: 1466010680000 which should equate to June 15, 2016 1:11 PM. These dates show correctly when viewing the related table attributes in the viewer. The date fields in the related burials table are of type esriFieldTypeDate .
I’ve found what I believe is the code for the MapTipContentView in the Mapping.js for the application. However, I’ve been trying to use console.log() to determine when this code gets called and I haven’t had any luck. Even if I could figure out what code is bringing the date into the MapTip, I’m not sure what code is needed to make the date/time format properly.
Is it possible a data link to the related table (instead of having a Relationship in Essentials) would fix the issue? We’re currently unable to create the necessary data connection to the development database where the burials table is located, but this won’t always be the case. Has anyone dealt with a similar issue and did a data link work?
0
-
Hi Emily,
I would expect that you could likely construct a workaround using a data link. I tested on my end and found that I was able to use a data link's replacement token for a date field and get a plain text date like this in the viewer:
Tue Oct 24 2017 00:00:00 GMT-0700 (Pacific Daylight Time)
Since data links will let you write your own SQL statement (the "advanced" cog icon when viewing your data links in Manager), you could probably also select a string version of the date field if you wanted more control over its formatting.
I think the only issue would be if the data links were slow to resolve. The viewer will show you your feature details or map tips without waiting for the associated data link requests to finish, so if those requests are slow then the feature details could be written and viewed before the linked data is available.
Hope that helps,
-Amanda0 -
Dear Amanda,
Thank you for the tip, I use data links and show it in the map tip from long time but I notice for the new essensials version, the map tip not show the datalink information, is there a workround for that (Feature details could be written and viewed before the linked data is available)0 -
Hi Ahmed,
We've had others report this issue as well with 2.12 and 2.12.1. It's being tracked as BUG 30624, and we're targeting a fix for it in the next HTML5 viewer release. Unfortunately we don't have any workarounds to provide, it will need a fix in the viewer code.0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare