POST
|
Unfortunately there is no such support in the REST endpoints that ESRI Silverlight API uses.
... View more
12-30-2010
07:25 AM
|
0
|
0
|
164
|
POST
|
Sorry, I forgot to mention that they are both in System.Windows namespace, i.e. the XML namespaces should be defined as the following:
xmlns:scm="clr-namespace:System.ComponentModel;assembly=System.Windows"
xmlns:dat="clr-namespace:System.Windows.Data;assembly=System.Windows"
... View more
12-30-2010
05:56 AM
|
0
|
0
|
220
|
POST
|
I guess what you are trying to achieve is to show the results in a different panel in the same page?? If so, then you would just need to place your DataGrid control in a desired panel (QueryDetailsDataGrid in that SDK sample) and leave the rest of the code as-is.
... View more
12-29-2010
11:41 AM
|
0
|
0
|
188
|
POST
|
1. Yes, you can modify the default template of the FeatureDataForm. There are also additional templates named as ComboBoxStyle, DatePickerStyle, LabelStyle, and TextBoxStyle to let developers change the look and feel of its content. 2. You can use EditorWidget (see editing sample here) or TemplatePicker (SDK sample here) controls to add/delete data in your feature layer. Please note that you need to set their "ShowAttributesOnAdd" property to TRUE to automatically popup the FeatureDataForm for user to set the attributes for the newly added features.
... View more
12-29-2010
11:27 AM
|
0
|
0
|
206
|
POST
|
From what I see in the crossdomain.xaml file you posted the map service your are trying to access only provides HTTPS sources permission or any domain containing ".wygisc.uwyo.edu" at the end of their URL therefore; you need a proxy page to access the map service. I tried using ESRI's demo proxy page in which we generally use in our SDK samples and it worked; see the code snippet below:
<esri:ArcGISTiledMapServiceLayer ID="David'sLayer"
ProxyURL="http://serverapps.esri.com/SilverlightDemos/ProxyPage/proxy.ashx"
Url="http://sunlight.wygisc.uwyo.edu/ArcGIS/rest/services/Base_Data/MapServer" />
... View more
12-29-2010
09:51 AM
|
0
|
0
|
272
|
POST
|
By defaut the toggle button has two states: checked and unchecked. The code snippet I gave you for toggle button approach considers users switching between the default map mouse down behavior (when the button is not checked) and the identify mode (when it's checked) therefore; when you toggle (check) that button the identify works otherwise it won't. If you want to use the identify as your default behavior you can set IsChecked property of your ToggleButton to TRUE, i.e.:
<ToggleButton x:Name="btnidentificar" Content="Identify" Width="50" Height="50" Margin="5"
IsChecked="True" VerticalAlignment="Top" ToolTipService.ToolTip="Identificador" />
... View more
12-29-2010
09:05 AM
|
0
|
0
|
82
|
POST
|
Using Button or ToggleButton will depend on your use-case. To use a ToggleButton you can simply check for its "IsChecked" value in "QueryPoint_MouseClick" handler and return when the button is toggled, i.e.:
privatevoid QueryPoint_MouseClick(object sender, ESRI.ArcGIS.Client.Map.MouseEventArgs e)
{
if (!btnidentificar.IsChecked.Value)
return;
// Existing code here...
}
And the code in your XAML would be something similar to this:
<ToggleButton x:Name="btnidentificar" Content="Identify" Width="50" Height="50" Margin="5"
VerticalAlignment="Top" ToolTipService.ToolTip="Identificador" />
If you were to use a Button control instead you can have a global boolean flag in your user control and set it to TRUE/FALSE when your button is clicked and in "QueryPoint_MouseClick" handler check against that flag and return if it's not TRUE.
... View more
12-29-2010
08:06 AM
|
0
|
0
|
393
|
POST
|
You would need to place the clientaccesspolicy.xml file at the root of the domain where the service is hosted. More information here. An alternative approach would be using a proxy page (.ashx file) for the services you are not hosting or have no access to place this file.
... View more
12-29-2010
07:31 AM
|
0
|
0
|
272
|
POST
|
Try and use "clr-namespace:System.ComponentModel;assembly=System.Windows" instead.
... View more
12-29-2010
07:20 AM
|
0
|
0
|
220
|
POST
|
- To set the ItemsSource property of your ListBox control follow the instructions below: 1. Select your ListBox in Expression Blend and look for "ItemsSource" property in "Common Properties" section of the Properties tab. 2. Use "Advanced Options" indicator --> Data Binding... 3. In "Create Data Binding" window click on "Element Property" tab, select your map control in "Scene elements" list. 4. Check "Use a custom path expression" CheckBox and type in "Layers.[DynamicLayerCalifornia].Layers" for its TextBox (Note that you could have simply selected the "Layers" property in "Properties" list on the right side of this tab however; you are specifically looking for layers collection in your dynamic layer hence; need to type it in). 5. Click "OK", you are done with the element data binding of your ListBox. - To customize your ListBox ItemTemplate do the following: 1. In Expression Blend right click on your ListBox --> Edit Additional Templates --> Edit Generated Items (ItemTemplate) --> Create Empty. 2. In "Create DataTemplate Resource" window enter the name/key for the template you are creating for your ListBox. 3. Drag and drop a CheckBox control inside of the "Grid" in the data template you are editing (you should see a small transparent squared Grid). 4. Set the properties of the CheckBox after selecting it, i.e. ClickMode, Margin, etc... For "IsChecked" property of the CheckBox use the "Advanced Options" indicator --> Data Binding... and in "Create Data Binding" window check "Use a custom path expression" CheckBoxand type in "DefaultVisibility" after clicking on the "Data Context" tab. Do the same for the "Content" and "Tag" properties.
... View more
12-29-2010
07:11 AM
|
0
|
0
|
334
|
POST
|
Nancititla, Could you please explain your use-case a little more? Also, are you using a button or a toggle button? The reason I'm asking these is that the identify tool ultimately requires users to click on the map control.
... View more
12-29-2010
06:30 AM
|
0
|
0
|
393
|
POST
|
One way of doing this would be hooking up mouse event handlers and setting their EventArgs "Handled" property to TRUE. Here is an example for the mouse wheel event handler in C#:
private void Map_MouseWheel(object sender, MouseWheelEventArgs e)
{
e.Handled = true;
}
Hope this helps.
... View more
12-29-2010
06:17 AM
|
0
|
0
|
101
|
POST
|
You are missing the C# or VB code behind the XAML of your user control (MainPage). Simply look for those handlers, right-click on them and click on "Navigate to Event Handler" in the drop down menu. If you got the code from SDK samples and have the same functionality you could use the code available in "Code Behind C#" or "Code Behind VB" tabs on top of the frame showing the samples.
... View more
12-29-2010
06:12 AM
|
0
|
0
|
116
|
POST
|
You can find a blog here about how to use Blend to customize look and feel of the ArcGIS Silverlight API controls.
... View more
12-29-2010
05:49 AM
|
0
|
0
|
334
|
POST
|
You cannot check existance of a feature on a layer against instances of the features returned by the query task, instead you should check for equality in their unique identifier attribute. Assuming you have an "ObjectID" field in your layer a sample C# code would be:
var graphic = from g in graphicsLayer.Graphics
where g.Attributes["ObjectID"].Equals(feature.Attributes["ObjectID"])
select g;
if (graphic.Count() == 0)
{
// Code for adding the graphic here
}
... View more
12-28-2010
02:10 PM
|
0
|
0
|
232
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|