Hi,
I previously asked Do graphics layers support the time extent property on the mapview. If so, how do i define the indiv...
The response works for me to an extent however I still cannot get quite the same results I was getting with the WPF SDK.
I have the time extent on my MapView bound to a TimeExtent that changes on a timer.
The extent is a range of 5 minutes and most of the points on the map have a start/end time 30 minutes apart.
My issue is that the points only appearing when the extent is around the start time. The points disappear before the extent reaches the end time.
My guess is that I'm assuming the wrong thing about the way the Start/End time on the graphic and the TimeExtent on the MapView interact.
What I need is for it to display any graphic that has a start time before the extent start and a end time after the start of the extent.
Is there some way to adjust this?
Solved! Go to Solution.
Hi Vincent,
Unfortunately that's an identified bug that should be fixed in the next version.
Sorry for the inconvenience.
/Dominique
I did a bit more digging.
I used this code to check what I thought should be currently displayed
For Each g As Graphic In source
If te1.Intersects(New TimeExtent(g.Attributes("Start"), g.Attributes("End"))) Then
count += 1
End If
Next
Where te1 is timeextent set on the MapView.
This code returns a considerably higher count than what is being displayed on the map.
The following code has a count of exactly what is being displayed.
For Each g As Graphic In source
If te1.Intersects(g.Attributes("Start")) Then
count += 1
End If
Next
How does the layer determine what is within the time extent and is there a way to change it?
Did you see my answer to the similar question you posted here?
Oh wait... sorry I just noticed you linked to it as well.
Time extent is defined via the attributes on the graphic. Set the attribute fields you define as start/end time.
ie
graphic.Attributes["Start"] = new DateTime(2014,12,5);
graphic.Attributes["End"] = new DateTime(2014,12,6);
Note intersection is done including partial intersection, and not just fully within.
I do have the attributes set on the graphic
for example
graphic.Attributes["Start"] = new DateTime(2014,12,5,6,0,0) // Dec 5th 6AM
graphic.Attributes["End"] = new DateTime(2014,12,5,6,30,0) // Dec 5th 6:30AM
The time Extent is set as binding.
But the object it is bound to is
CurrentTimeExtent = new TimeExtent(new DateTime(2014,12,5,5,58,0), new DateTime(2014,12,5,6,3,0)) // From 5:58 to 6:03
When it is defined like this it shows the point on the map correctly because the Start is within the time extent.
I have a timer the increases the start and endtime of the time extent by 5 minutes.
After the first tick when the time extent is now from 6:03 to 6:08 the point is not longer displayed.
Morten Nielsen wrote:
[...]
Note intersection is done including partial intersection, and not just fully within.
That is exactly what I want it to do but it doesn't seem to be happening that way for me.
Hi Vincent,
Unfortunately that's an identified bug that should be fixed in the next version.
Sorry for the inconvenience.
/Dominique
That sucks. Is there any release timeline information anywhere?
I'd just like to say that I can confirm that this is fixed as of 10.2.5.
Thank you everyone for your help.