<esri:Map Extent="-120, 20, -100, 40" Grid.Row="3" Name="MyMap" Visibility="Visible" Background="Transparent" Margin="2,0" BorderThickness="1" BorderBrush="{StaticResource TitleBarGradient}"> <!--<esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" />--> <esri:ArcGISDynamicMapServiceLayer ID="StreetMapLayer" Url="http://www.test.com:8000/arcgis/rest/services/pp/om/MapServer" /> <esri:GraphicsLayer ID="MyGraphicsLayer" /> </esri:Map> <esri:MapProgressBar x:Name="MyProgressBar" Grid.Row="3" Map="{Binding ElementName=MyMap}" HorizontalAlignment="Center" VerticalAlignment="Bottom" Width="200" Height="36" Margin="25" /> <esri:InfoWindow x:Name="MyInfoWindow" Padding="2" CornerRadius="20" Background="LightSalmon" Map="{Binding ElementName=MyMap}" ContentTemplate="{StaticResource MyGrLayerInfoWindowTemplate}" />
<esri:SimpleMarkerSymbol x:Key="RedMarkerSymbol" Color="Red" Size="12" Style="Circle" /> <esri:SimpleMarkerSymbol x:Key="BlackMarkerSymbol" Color="Black" Size="14" Style="Diamond" /> <esri:PictureMarkerSymbol x:Key="GlobePictureSymbol_Blue" OffsetX="8" OffsetY="8" Source="/ESRI-V-10-SIL4;component/Images/sphere-blue-dark-16x16.png" /> <esri:PictureMarkerSymbol x:Key="GlobePictureSymbol_Green" OffsetX="8" OffsetY="8" Source="/ESRI-V-10-SIL4;component/Images/sphere-green-dark-16x16.png" /> <esri:PictureMarkerSymbol x:Key="GlobePictureSymbol_Red" OffsetX="8" OffsetY="8" Source="/ESRI-V-10-SIL4;component/Images/sphere-red-dark-16x16.png" /> <esri:PictureMarkerSymbol x:Key="GlobePictureSymbol_Black" OffsetX="8" OffsetY="8" Source="/ESRI-V-10-SIL4;component/Images/sphere-Black-dark-16x16.png" /> <esri:PictureMarkerSymbol x:Key="GlobePictureSymbol_Gray" OffsetX="8" OffsetY="8" Source="/ESRI-V-10-SIL4;component/Images/sphere-Gray-dark-16x16.png" /> <esri:SimpleLineSymbol x:Key="DefaultLineSymbol" Color="Green" Style="DashDot" Width="4" /> <esri:SimpleFillSymbol x:Key="DefaultFillSymbol" Fill="Green" BorderBrush="Blue" BorderThickness="3" /> </Grid.Resources>
If EventId = 253 Then colourstyle = "GlobePictureSymbol_Blue" ElseIf EventId = 110 Then colourstyle = "GlobePictureSymbol_Green" ElseIf EventId = 108 Then 'Added for fix time report for new device colourstyle = "GlobePictureSymbol_Green" ElseIf EventId = 101 Then colourstyle = "GlobePictureSymbol_Red" ElseIf EventId = 142 Then colourstyle = "GlobePictureSymbol_Black" ElseIf EventId = 254 Then colourstyle = "GlobePictureSymbol_Gray" Else colourstyle = "GlobePictureSymbol_Black" End If Dim graphic As New Graphic() With { .Geometry = New MapPoint(Convert.ToDouble(gpsNMEASentence(4)), Convert.ToDouble(gpsNMEASentence(2))), .Symbol = TryCast(LayoutRoot.Resources(colourstyle), Symbol) }
Solved! Go to Solution.