|
POST
|
I see the REST API has the HtmlPopup resource ... http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/ms-htmlPopup.html The only way I see to leverage this in Silverlight would be to use Html.Window.Navigate, which would be clunky. Similar to configuring a layer in an mxd to use Html, like this ... http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s50000002r000000.htm ... I'd like an option to use Xaml instead of Html, maybe with a XamlPad type of interface. When published the layer would appear through Rest as esriServerHTMLPopupTypeXaml. The silverlight SDK could provide a class that uses XamlReader to load the Xaml and present it. I guess the WPF runtime could also leverage this.
... View more
09-15-2011
02:21 PM
|
0
|
1
|
662
|
|
POST
|
OK, never mind, I now see this isn't expected to work for single fused cache layers. http://forums.arcgis.com/threads/31873-Unusual-Legend-Behavior-for-Grouping?p=118901&viewfull=1#post118901 Seems like Esri should choose a different mapservice for this demo app, instead of this one ... http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/WaterTemplate/WaterDistributionNetwork/MapServer
... View more
09-15-2011
01:33 PM
|
0
|
0
|
1182
|
|
POST
|
I think this is a bug in the setter for LayerItemViewModel.IsEnabled, I changed the demo code: <!--<CheckBox IsChecked="{Binding IsEnabled, Mode=TwoWay}" IsEnabled="{Binding IsInScaleRange}" VerticalAlignment="Center"/>-->
<!--<TextBlock Text="{Binding Label}" VerticalAlignment="Center" />-->
<Button VerticalAlignment="Center">
<TextBlock Text="{Binding Label}" />
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click" >
<local:ShowLayerInfoAction/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button> And in the ShowLayerInfoAction, debug always prints true before and after: protected override void Invoke(object parameter)
{
try
{
var livm = this.AssociatedObject.DataContext as LayerItemViewModel;
var dynLayer = livm.Layer as ArcGISDynamicMapServiceLayer;
Debug.WriteLine("IsEnable before " + livm.IsEnabled.ToString());
livm.IsEnabled = !livm.IsEnabled;
Debug.WriteLine("IsEnable after " + livm.IsEnabled.ToString());
//string url = String.Format("{0}/{1}",dynLayer.Url,livm.SubLayerID);
//HtmlPage.Window.Navigate(new Uri(url), "_blank");
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}
}
... View more
09-15-2011
12:54 PM
|
0
|
0
|
1182
|
|
POST
|
Ahh, thanks, I should have known better than try to deal visually with this code in Visual Studio. I'm not sure if this is a bug, but if I run the original demo app without any changes, and go to the TOC template, I'm unable to toggle on and off different sub layers (like Hydrants). See attached. Is this an error in the style somewhere?
... View more
09-15-2011
12:30 PM
|
0
|
0
|
1182
|
|
POST
|
Thanks, this helps a lot. I'm also wanting to style the appearance of the little triangles used to expand/collapse group layers. Notice how the black background on this sample makes it impossible to see the black triangles next to group layers that are expanded. After the background to orange, I can see them (see attached). How could I just change the color for the triangle when it's in an expanded state?
... View more
09-15-2011
08:28 AM
|
0
|
0
|
1182
|
|
POST
|
Hi - I'm using the Legend from this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LegendWithTemplates And would like to put the templates into a style. Is there a sample somewhere that shows how to do this? Thanks!
... View more
09-06-2011
02:09 PM
|
0
|
7
|
1584
|
|
POST
|
I was hoping to find documentation for 10.1 beta similar to that for 10.0 http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/index.html However, I don't see it anywhere. Is it available? If not, any time estimate on when it will be coming? I'm looking in particular for documentation showing about dynamic layers. I see in desktop how to set it up ... http://resourcesbeta.arcgis.com/en/help/main/10.1/index.html#/Enabling_dynamic_layers_on_a_map_service/0053000001r8000000/ But what kind of REST calls do I make to the service to, say, change a renderer for a layer? Thanks!
... View more
08-19-2011
09:53 AM
|
0
|
3
|
1016
|
|
POST
|
Has Esri (or anyone else) published any sample 10.1 mapservices I can test against. In particular, I'm looking for one that is configured for dynamic layers. Thanks! Kirk
... View more
08-17-2011
06:59 PM
|
0
|
3
|
1061
|
|
POST
|
I think I've found a workaround private void Test()
{
var fLayer = new FeatureLayer();
fLayer.ID = "my flayer";
fLayer.Url = @"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0";
//fLayer.Url = @"http://www.badurl123.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0;";
fLayer.Initialized += (sender, args) =>
{
foreach (Field f in fLayer.LayerInfo.Fields)
Debug.WriteLine(f.Name);
};
fLayer.InitializationFailed += (sender, args) =>
{
Debug.WriteLine("init failed");
};
fLayer.Initialize();
} However if I use badurl123.com, InitializationFailed is not called as I would expect. Instead Initialized is called, which is not expected.
... View more
08-05-2011
11:36 AM
|
0
|
0
|
356
|
|
POST
|
Not sure if this is a bug or maybe I'm just doing something wrong. When I run this code with 2.2 ... private void Test()
{
WebClient wc = new WebClient();
wc.OpenReadCompleted += (sender, args) =>
{
if (args.Error == null)
{
StreamReader reader = new StreamReader(args.Result);
string json = reader.ReadToEnd();
var fLayer = FeatureLayer.FromJson(json);
}
else
Debug.WriteLine(args.Error.Message);
};
string url = @"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/0?f=pjson";
wc.OpenReadAsync(new Uri(url));
}
I get this exception: System.ArgumentException occurred
Message=layerDefinition
Parameter name: Property was not found during JSON deserialization.
StackTrace:
at ESRI.ArcGIS.Client.FeatureLayer.FromDictionary(IDictionary`2 definition)
at ESRI.ArcGIS.Client.FeatureLayer.FromJson(String json)
at Viewer.Addins.Query.QueryControl.<Test>b__1(Object sender, OpenReadCompletedEventArgs args)
InnerException: Any suggestions are greatly appreciated. Thanks!
... View more
08-05-2011
11:02 AM
|
0
|
2
|
981
|