|
POST
|
I need to project the bing maps to Wgs84 UTM Z19S The bing map is a cached tiled map service and is only available in Web Mercator. So you can't project bing maps tiles to UTM Z19S. Most generally, the tiled map service is driving the spatial reference of the map, then other services have to be projected in this spatial reference.
... View more
01-20-2011
12:37 AM
|
0
|
0
|
878
|
|
POST
|
If the Geometry of your objects is 'Points', you can use a TextSymbol or a custom symbol including a TextBlock and bind the text property to an attribute of your graphics. There is a sample of TextSymbol here : http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AddGraphicsXAML If the geometry is Polyline or Polygon, you can create a new graphicslayer for your labels but you will have to define the label position either by a geometry service (such as LabelPoints) or by a calculation at the client side (such as geometry.Extent.GetCenter()).
... View more
01-19-2011
04:21 AM
|
0
|
0
|
1426
|
|
POST
|
What to you get if you request your map service URL in your browser? You should get something like : http://services.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Median_Home_Value/MapServer
... View more
01-17-2011
06:54 AM
|
0
|
0
|
1203
|
|
POST
|
When are you trying to update your features? (which event?) It might happen that the feature layer is not yet initialized when you try to update and so the collection of graphics is not loaded yet.
... View more
01-17-2011
05:27 AM
|
0
|
0
|
1684
|
|
POST
|
For the moment, I am in lack of idea:(. You have never answered to my question : 'Can you reproduce the issue with a public tiled map service or is it specific to your service? '
... View more
01-13-2011
07:54 AM
|
0
|
0
|
1991
|
|
POST
|
I tried your code and it works fine for me except now the selection color is inoperative. How would you provide for that? Would I need another renderer with a different symbol? You can keep the same renderer but use a symbol managing the 'Selected' state. Example coming from the interactive samples: <esriSymbols:MarkerSymbol x:Key="SelectMarkerSymbol" >
<esriSymbols:MarkerSymbol.ControlTemplate>
<ControlTemplate>
<Ellipse x:Name="Element" Width="15" Height="15" StrokeThickness="10"
Stroke="Green" >
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="SelectionStates">
<VisualState x:Name="Unselected" />
<VisualState x:Name="Selected">
<Storyboard>
<ColorAnimation Storyboard.TargetName="Element"
Storyboard.TargetProperty="(Ellipse.Stroke).(SolidColorBrush.Color)"
To="Cyan" Duration="00:00:0.25"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Ellipse>
</ControlTemplate>
</esriSymbols:MarkerSymbol.ControlTemplate>
</esriSymbols:MarkerSymbol>
... View more
01-13-2011
07:50 AM
|
0
|
0
|
1724
|
|
POST
|
I agree with Dan, the XamlReader doesn't have the context to understand where to wire your click event handler up. Another option is you to develop your own control managing the click event.
... View more
01-13-2011
07:21 AM
|
0
|
0
|
1517
|
|
POST
|
BorderBrush = new SolidColorBrush(Color.FromArgb(0, 255,255,255)), BorderThickness = 2, Fill = new SolidColorBrush(Color.FromArgb(0, 255,255,255)) You are using fully transparent colors. Try with 'FromArgb(255, 255,255,255))'
... View more
01-12-2011
04:36 AM
|
0
|
0
|
532
|
|
POST
|
By reversing the formula we get : var y = -wgs84EarthRadius * Math.Log(Math.Tan((Math.PI / 2 - latitude)/2.0)); Then knowing that Tan²(x/2) = (1 - cos(x)) / (1+cos(x)), we can simplify to: var y = wgs84EarthRadius / 2.0 * Math.Log((1.0 + Math.Sin(latitude)) / (1.0 - Math.Sin(latitude)));
Note : latitude in radians
... View more
01-10-2011
05:28 AM
|
0
|
0
|
637
|
|
POST
|
I suggest you start following the steps described in this 'Getting Started' video : http://help.arcgis.com/en/webapi/silverlight/help/index.html#//016600000004000000.htm You should end up with a working silverlight application but without editing capabilities. Then you can add editing capabilities by copying and pasting code from the interactive sample. 1) In your MainPage.xaml.cs add this code coming from the sample: private void CancelEditsButton_Click(object sender, RoutedEventArgs e)
{
Editor editor = LayoutRoot.Resources["MyEditor"] as Editor;
foreach (GraphicsLayer graphicsLayer in editor.GraphicsLayers)
{
if (graphicsLayer is FeatureLayer)
{
FeatureLayer featureLayer = graphicsLayer as FeatureLayer;
if (featureLayer.HasEdits)
featureLayer.Update();
}
}
}
2) In your MainPage.xaml add: 2.1) The editor resource <Grid.Resources>
<esri:Editor x:Key="MyEditor"
Map="{Binding ElementName=MyMap}"
LayerIDs="ThreatAreas"
GeometryServiceUrl="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"
/>
</Grid.Resources>
2.2) The FeatureLayer to edit <esri:FeatureLayer ID="ThreatAreas"
Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/2"
AutoSave="False"
Mode="OnDemand"
ValidateEdits="True"
DisableClientCaching="True" />
2.3) The whole panel with the editor tools:
<Border Background="#FF919191" BorderThickness="1" CornerRadius="5"
HorizontalAlignment="Right" VerticalAlignment="Top"
Padding="5" BorderBrush="Black" Margin="0,5,5,0"
DataContext="{StaticResource MyEditor}">
<StackPanel x:Name="EditorTools"
Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Button x:Name="AddButton" Margin="2"
ToolTipService.ToolTip="Fire"
Content="Add Polygon"
Command="{Binding Add}">
<Button.CommandParameter>
<sys:Int32>10301</sys:Int32>
</Button.CommandParameter>
</Button>
<Button x:Name="SelectButton" Margin="2"
Command="{Binding Select}"
CommandParameter="New" >
<TextBlock>New<LineBreak/>Selection</TextBlock>
</Button>
<Button x:Name="AddSelectButton" Margin="2"
Command="{Binding Select}"
CommandParameter="Add">
<TextBlock>Add to<LineBreak/>Selection</TextBlock>
</Button>
<Button x:Name="RemoveSelectButton" Margin="2"
Command="{Binding Select}"
CommandParameter="Remove" >
<TextBlock>Remove from<LineBreak/>Selection</TextBlock>
</Button>
<Button x:Name="ClearSelectionButton" Margin="2"
Command="{Binding ClearSelection}">
<TextBlock>Clear<LineBreak/>Selection</TextBlock>
</Button>
<Button x:Name="DeleteButton" Margin="2"
Command="{Binding DeleteSelected}">
<TextBlock>Delete<LineBreak/>Selected</TextBlock>
</Button>
<Button x:Name="CancelButton" Margin="2"
Command="{Binding CancelActive}">
<TextBlock>Cancel<LineBreak/>Action</TextBlock>
</Button>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button x:Name="EditVerticesButton" Margin="2"
Command="{Binding EditVertices}">
<TextBlock>Edit Vertices<LineBreak/>/Move Selected</TextBlock>
</Button>
<Button x:Name="CutButton" Margin="2"
Command="{Binding Cut}">
<TextBlock>Cut<LineBreak/>Selected</TextBlock>
</Button>
<Button x:Name="ReshapeButton" Margin="2"
Command="{Binding Reshape}">
<TextBlock>Reshape<LineBreak/>Selected</TextBlock>
</Button>
<Button x:Name="UnionButton" Margin="2"
Command="{Binding Union}">
<TextBlock>Union<LineBreak/>Selected</TextBlock>
</Button>
<Button x:Name="SaveButton" Margin="2"
Command="{Binding Save}">
<TextBlock FontWeight="Bold">Save<LineBreak/>Edits</TextBlock>
</Button>
<Button x:Name="CancelEditsButton" Margin="2"
IsEnabled="{Binding ElementName=MyMap, Path=Layers[ThreatAreas].HasEdits}"
Click="CancelEditsButton_Click" >
<TextBlock FontWeight="Bold">Cancel<LineBreak/>Edits</TextBlock>
</Button>
</StackPanel>
<StackPanel Orientation="Horizontal">
<CheckBox x:Name="FreehandCheckBox" VerticalAlignment="Center" Margin="2"
IsChecked="{Binding Path=Freehand, Mode=TwoWay}"
Content="Freehand Draw" />
<CheckBox x:Name="AutoCompleteCheckBox" VerticalAlignment="Center" Margin="2"
IsChecked="{Binding Path=AutoComplete, Mode=TwoWay}"
Content="Auto Complete" />
<CheckBox x:Name="AutoSelectCheckBox" VerticalAlignment="Center" Margin="2"
IsChecked="{Binding Path=AutoSelect, Mode=TwoWay}"
Content="Auto Select" />
<CheckBox x:Name="ContinuousCheckBox" VerticalAlignment="Center" Margin="2"
IsChecked="{Binding Path=ContinuousMode, Mode=TwoWay}"
Content="Continuous Action" />
</StackPanel>
</StackPanel>
</Border>
You should get an application with editing capabilities.
... View more
01-07-2011
08:14 AM
|
0
|
0
|
2248
|
|
POST
|
The sample you pointed out is using a standard DataGrid not a FeatureDataGrid : On 'SelectionChanged' event, a graphic is created and is highlighted on the map. You can reuse the same idea with the event MouseEnter of an ItemsControl or with the event SelectionChanged of a ListBox control.
... View more
01-07-2011
07:46 AM
|
0
|
0
|
1864
|
|
POST
|
what is corresponding event where I can get dynmicservicelayers.visiblelayers? You can use the 'VisibilityChanged' event of the ArcGISDynamicMapServiceLayer class.
... View more
01-07-2011
07:31 AM
|
0
|
0
|
607
|
|
POST
|
This has fixed the problem! That's great for now -- but will it create problems for me in the future? No problem, the important point is that the class name declared in the xaml file be in sync with the full classname (rootnamespace + namespace surrounding the class + class name) of the VB project. Why did ESRI put the Namespace in the xaml.vb code sample if it doesn't work? It works if you have no rootnamespace for your project. I guess this has been done to keep VB code close to C# code (and for a C# project there is no rootnamespace).
... View more
01-07-2011
07:29 AM
|
0
|
0
|
3760
|
|
POST
|
I guess it's a compilation error. Which code line provides this error? What do you mean by 'migrate to SP1'? is it the server?
... View more
01-07-2011
07:18 AM
|
0
|
0
|
501
|
|
POST
|
If you are using VB, it's probably the same error than this described in this thread : http://forums.arcgis.com/threads/11700-InitializeComponent-is-not-declared-Expression-Blend-Error?p=66309#post66309
... View more
01-07-2011
12:06 AM
|
0
|
0
|
578
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-12-2025 03:01 AM | |
| 1 | 10-14-2025 09:24 AM | |
| 1 | 06-13-2013 09:22 AM | |
| 1 | 04-29-2022 02:21 AM | |
| 1 | 04-29-2022 02:28 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-30-2025
08:06 AM
|