|
POST
|
At first glance, I would say that there is an issue with the geoemtry you created by code. But difficult to guess which one. We would need more infos on how it's done.
... View more
01-31-2011
01:15 AM
|
0
|
0
|
929
|
|
POST
|
Supposedly, when the observable collection of LegendRequestor has changed, it should fire off the OnActiveLayersLegendsPropertyChanged event in the legend xmal, I am not sure what you call 'LegendRequestor' has changed. If you set the ActiveLayersLegend property with a new observable collection, the event should be fired. But if you change the observable collection by adding/removing/... items. This event is not supposed to be fired. You have to hook up the CollectionChanged event instead.
... View more
01-31-2011
01:10 AM
|
0
|
0
|
1202
|
|
POST
|
Rex Hansen blogged about that here : http://rexdotnet.blogspot.com/2010/09/use-google-maps-with-arcgis-silverlight.html
... View more
01-31-2011
12:56 AM
|
0
|
0
|
2592
|
|
POST
|
Is there no better way than to create text objects? I don't think so. I need non overlapping labels There is no built-in methods to avoid overlapping labels -> this would need specific development. or at least being able to set text background color (cannot find a way to do that on text objects). That makes text objects unusable if you have points close to each other. A textblock has no background but you can surround it with any panels which has background. Is feature layer a better alternative? There is no big difference with graphicslayer because, in your case, you are not requesting a feature service (basically a featurelayer is a graphicslayer which is querying a feature rest end point for you). Is it possible to create feature layers dynamically? Sure : you can instantiate a featurelayer, set the url and call initialize or add it to the map. And is "real" labelling possible in feature layers? Any other solutions available? At this time, there is nothing more for the labelling in feature layers.
... View more
01-31-2011
12:44 AM
|
0
|
0
|
1441
|
|
POST
|
Are we missing something obvious? No, this is not that obvious!! In this sample, http://www.arcgis.com/home/item.html?id=e361c2cc69784fcba34358d0458f66e3 there is a CenteredContentControl class which is mainly used to display the page number in the grid. This class is probably close of what you need.
... View more
01-28-2011
08:06 AM
|
0
|
0
|
1488
|
|
POST
|
You are right there is an issue.The event is not fired with Bing layers (because this kind of layer doesn't return any legend).This is a bug that we'll try to fix for next version.For the moment, the workaround might be to remove the bing layers from the legend whatever the layer firing the event: private void Legend_Refreshed(object sender, Client.Toolkit.Legend.RefreshedEventArgs e)
{
foreach (var bingLayerItem in MyLegend.LayerItems.Where(item => item.Layer is TileLayer).ToList())
MyLegend.LayerItems.Remove(bingLayerItem);
} Not very elegant, but....
... View more
01-27-2011
07:39 AM
|
0
|
0
|
2771
|
|
POST
|
The feature returned in the 'IdentifyResult' of an identify task contains an attributes dictionary. So in your case, you should get you ID, location, condition,.... by code like
forreach( IdentifyResult result in results)
{
Graphic feature = result.Feature;
foreach(var attribute in feature.Attributes)
{
//attribute.Key and attribute.Value available here
}
}
... View more
01-27-2011
06:03 AM
|
0
|
0
|
657
|
|
POST
|
I have no direct answer to your question, but the following info can be useful : from version 2.1 (or 2.0 I am not sure), you can change the spatialreference of a map if there is no layer in the map. So to change the url of the basemap layer (supposed to be the first layer in this sample), you can use code like: LayerCollection layerCollection = MyMap.Layers;
MyMap.Layers = null;
MyMap.Extent = null;
(layerCollection[0] as ArcGISTiledMapServiceLayer).Url = myNewBaseLayerUrl;
MyMap.Layers = layerCollection;
Keeping the same map avoids the issues with bindings, events, behaviors that you could have by cloning.
... View more
01-27-2011
05:47 AM
|
0
|
0
|
646
|
|
POST
|
I was able to reproduce the issue. Looks like a bug. You'll try to fix it for the next version. Thanks for reporting this.
... View more
01-27-2011
05:01 AM
|
0
|
0
|
1340
|
|
POST
|
Unfortunately the scale information is not available when you consume a feature server layer. The workarounds could be: - To query and deserialize the json response by yourself or - to create a temporarly ArcGISDynamicMapServiceLayer useful only to retrieve this info. In this case, you don't need to add it to your map, you can instantiate it and call Initialize:
var arcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer
{
Url = myMapServiceUrl
};
arcGISDynamicMapServiceLayer.Initialized += Layer_Initialized;
arcGISDynamicMapServiceLayer.Initialize();
}
void Layer_Initialized(object sender, System.EventArgs e)
{
var layer = sender as ArcGISDynamicMapServiceLayer;
// Maxscale and Minscale are available here in layer.Layers[index]
}
... View more
01-27-2011
05:00 AM
|
0
|
0
|
1091
|
|
POST
|
This information is provided by the map service rest end point from ArcGIS server version 10SP1. So to get it, you need ArcGIS server 10SP1 and ArcGIS SL 2.1. Which server version have you? You can check if the resolution is provided by requesting your map service rest end point. Example of service with the info: http://services.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Median_Age/MapServer?f=pjson Example of service without the info: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer?f=pjson
... View more
01-27-2011
12:12 AM
|
0
|
0
|
1091
|
|
POST
|
Is there a way to remove the Bing basemap from the Legend? I tried using the same code as the GraphicsLayer, but it just doesn't see it. You have to hookup the handler to the Refreshed event: <esri:Legend x:Name="MyLegend" Map="{Binding ElementName=MyMap}" Height="400" Width="400"
Refreshed="Legend_Refreshed" > Then both versions of your code should work.
... View more
01-27-2011
12:00 AM
|
0
|
0
|
2771
|
|
POST
|
there is a need to print a map in a user defined scale. how can I define the printout extent based on the scale? Anyone has a formula for this purpose? thanks There is a print sample allowing to set the output scale here : http://www.arcgis.com/home/item.html?id=e361c2cc69784fcba34358d0458f66e3
... View more
01-26-2011
11:55 PM
|
0
|
0
|
695
|
|
POST
|
You can add the same slider to the layerTemplate:
<esri:Legend.LayerTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<CheckBox x:Name="CheckBoxLayers" Content="{Binding Label}"
IsChecked="{Binding IsEnabled, Mode=TwoWay}"
IsEnabled="{Binding IsInScaleRange}" Checked="CheckBox_Checked"
Unchecked="CheckBox_Unchecked">
</CheckBox>
<Slider Maximum="1" Value="{Binding Layer.Opacity, Mode=TwoWay}" Width="50" />
</StackPanel>
</DataTemplate>
</esri:Legend.LayerTemplate>
This is obsiously not modifying the opacity of the sublayer (that's not possible) but of the main service layer. But as you have only one sublayer in your service, the result is the same.
... View more
01-26-2011
06:48 AM
|
0
|
0
|
683
|
|
POST
|
This is exactly what we have been trying to do. So the sooner you can have the code posted the better. I can clean it up Send me an email ([email protected]), I will provide you the code 'as it is'.
... View more
01-26-2011
04:02 AM
|
0
|
0
|
3066
|
| 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
|