Original User: GordonFreeManIt's true. Base map layer in mercator projection and a feature layer in geographical coodinates. I simply don't understand how TimeExtent affects mercator projection. :confused:I use the API version 2.2.0.629 and ArcGIS Desktop 10.Screenshots and the source code below:
<UserControl x:Class="Retrospective.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:esri="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client"
xmlns:Toolkit="clr-namespace:ESRI.ArcGIS.Client.Toolkit;assembly=ESRI.ArcGIS.Client.Toolkit"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<esri:Map x:Name="MyMap" TimeExtent="{Binding ElementName=MyTimeSlider, Path=Value}">
<esri:ArcGISTiledMapServiceLayer Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer" />
<esri:FeatureLayer ID="vbLayer" Url="http://vmxp/ArcGIS/rest/services/vbgis/MapServer/0"
UpdateCompleted="FeatureLayer_UpdateCompleted"/>
</esri:Map>
<Grid HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="50,10,50,10" >
<Rectangle Fill="#77919191" Stroke="Gray" RadiusX="10" RadiusY="10" Margin="0,0,0,5" >
<Rectangle.Effect>
<DropShadowEffect/>
</Rectangle.Effect>
</Rectangle>
<Border Background="#FFFFFFFF" BorderBrush="DarkGray" CornerRadius="5" Margin="10,10,10,15"
HorizontalAlignment="Center" VerticalAlignment="Top" >
<StackPanel Margin="5">
<TextBlock Text="VBs" FontSize="16" HorizontalAlignment="Center"/>
<Grid>
<TextBlock
Text="{Binding ElementName=MyMap, Path=Layers[vbLayer].TimeExtent.Start, Mode=OneWay}"
HorizontalAlignment="Left" />
<TextBlock
Text="{Binding ElementName=MyMap, Path=Layers[vbLayer].TimeExtent.End, Mode=OneWay}"
HorizontalAlignment="Right" />
</Grid>
<Toolkit:TimeSlider x:Name="MyTimeSlider"
Loop="True" PlaySpeed="0:0:0.15"
TimeMode="TimeExtent"
MinimumValue="{Binding ElementName=MyMap, Path=Layers[vbLayer].TimeExtent.Start, Mode=OneWay}"
MaximumValue="{Binding ElementName=MyMap, Path=Layers[vbLayer].TimeExtent.End, Mode=OneWay}"
Value="2000/08/04 01:00:00 UTC,2000/08/07 01:00:00 UTC"
Height="20" />
</StackPanel>
</Border>
</Grid>
</Grid>
</UserControl>
namespace Retrospective
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
MouseRightButtonDown += new MouseButtonEventHandler(MainPage_MouseRightButtonDown);
}
void MainPage_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
// (MyMap.Layers["vbLayer"] as FeatureLayer).Update();
// (MyMap.Layers["vbLayer"] as FeatureLayer).Refresh();
FeatureLayer featureLayer = (MyMap.Layers["vbLayer"] as FeatureLayer);
}
private void FeatureLayer_UpdateCompleted(object sender, EventArgs e)
{
TimeExtent extent = new TimeExtent(MyTimeSlider.MinimumValue, MyTimeSlider.MaximumValue);
MyTimeSlider.Intervals = TimeSlider.CreateTimeStopsByTimeInterval(extent, new TimeSpan(0, 0, 10, 0, 0));
MyTimeSlider.Value = new TimeExtent(MyTimeSlider.MinimumValue, MyTimeSlider.MinimumValue.AddMinutes(20));
}
}
}
TimeExtent is disabled:[ATTACH=CONFIG]12639[/ATTACH] [ATTACH=CONFIG]12640[/ATTACH] TimeExtent is enabled:[ATTACH=CONFIG]12641[/ATTACH] [ATTACH=CONFIG]12642[/ATTACH]Properties: [ATTACH=CONFIG]12651[/ATTACH][TABLE="class: outer_border"]Layer: MyLayer (ID: 0)
Display Field: TIMEPOS
Type: Feature Layer
Geometry Type: esriGeometryPoint
Description:
Definition Expression:
Copyright Text:
Min. Scale: 0
Max. Scale: 0
Default Visibility: True
Extent:
XMin: 30.35382
YMin: 59.7104
XMax: 30.6107
YMax: 59.9484
Spatial Reference: 4326
Has Attachments: False
HTML Popup Type: esriServerHTMLPopupTypeAsHTMLText
Time Info:
Start Time Field: TIMEDATA
End Time Field: N/A
Track ID Field: N/A
Time Extent: [2011/12/22 11:40:00 UTC, 2011/12/22 19:40:00 UTC]
Time Reference: N/A
Time Interval: 25 (esriTimeUnitsMinutes)
Export Options:
Use Time: True
Time Data Cumulative: False
Time Offset: 0
Drawing Info:
Renderer:
Simple Renderer:
Symbol:
Simple Marker Symbol:
Style: esriSMSCircle, Color: [0, 150, 70, 255], Size: 7, Angle: 0, XOffset: 0, YOffset: 0
Outline
Color: [0, 0, 0, 255], Width: 1
Label:
Description:
Transparency: 0
Labeling Info: N/A
Fields:
VEHICLE_ID (Type: esriFieldTypeInteger, Alias: VEHICLE_ID)
TIMEPOS (Type: esriFieldTypeString, Alias: TIMEPOS, Length: 512 )
TIMEDATA (Type: esriFieldTypeDate, Alias: TIMEDATA, Length: 36 )
LATITUDE (Type: esriFieldTypeDouble, Alias: LATITUDE)
LONGITUDE (Type: esriFieldTypeDouble, Alias: LONGITUDE)
SPEED (Type: esriFieldTypeInteger, Alias: SPEED)
AZIMUT (Type: esriFieldTypeInteger, Alias: AZIMUT)
FUELLEVELTIME (Type: esriFieldTypeDate, Alias: FUELLEVELTIME, Length: 36 )
STATETIME (Type: esriFieldTypeDate, Alias: STATETIME, Length: 36 )
FUELLEVEL (Type: esriFieldTypeInteger, Alias: FUELLEVEL)
STATE (Type: esriFieldTypeInteger, Alias: STATE)
IGNITIONTIME (Type: esriFieldTypeDate, Alias: IGNITIONTIME, Length: 36 )
IGNITION (Type: esriFieldTypeInteger, Alias: IGNITION)
INPUTALERTTIME (Type: esriFieldTypeDate, Alias: INPUTALERTTIME, Length: 36 )
OBJECTID (Type: esriFieldTypeOID, Alias: OBJECTID)
Shape (Type: esriFieldTypeGeometry, Alias: Shape)
Type ID Field: N/A
Supported Interfaces: REST
Supported Operations: Query [/TABLE]