|
POST
|
I didn't find the bad layer URL in the help page you've referenced. But I found it in this page : http://help.arcgis.com/en/webapi/silverlight/help/Adding_layers.htm Is it what you meant? Thanks for reporting this.
... View more
07-29-2010
09:43 AM
|
0
|
0
|
360
|
|
POST
|
Did you see this article Using service across scheme ? As far as I know, it's still valid. That means that if your application is hosted on an https server, you can't access image hosted on an http server.
... View more
07-29-2010
09:38 AM
|
0
|
0
|
447
|
|
POST
|
You might have more chance to get answers in the forums Desktop (http://forums.arcgis.com/forums/5-ArcGIS-Desktop-General) or ArcObject(http://forums.arcgis.com/forums/20-ArcObjects-All-Development-Languages).
... View more
07-29-2010
09:21 AM
|
0
|
0
|
475
|
|
POST
|
It's depending on what you mean by 'Loading'. I know that, with ArcObject, the map is firing events when layers are added to the map (see IActiveViewEvents.ItemAdded), but I am not sure it's this kind of event you are looking for. That being said, if your question concerns ArcObject and Desktop, you should have more chance to get answers in the forums Desktop (http://forums.arcgis.com/forums/5-ArcGIS-Desktop-General) or ArcObject(http://forums.arcgis.com/forums/20-ArcObjects-All-Development-Languages). This forum is dedicated to Silverlight.
... View more
07-29-2010
09:20 AM
|
0
|
0
|
389
|
|
POST
|
Your are welcome. Note also that I kept a 'Button' because you introduce it in your sample. But you could directly use an image as it was in the original sample. In this case you have to use the MouseLeftbuttonDown event instead of Click event.
... View more
07-28-2010
06:01 AM
|
0
|
0
|
1594
|
|
POST
|
Instead of using Text to say Measure how can I use an Image like the other tools in my Toolbar? The Content of a Button can be any type of UIElement:
<Button Style="{StaticResource MenuItem}" Click="DisableDrawObject" HorizontalAlignment="Right" Foreground="Black" >
<Button.Content>
<Image ........... />
</Button.Content>
........
</Button>
... View more
07-28-2010
05:45 AM
|
0
|
0
|
1594
|
|
POST
|
Hi Emiliano, From the code, it looks like an event handler is set on the first click :
private void ckbVisibility_Checked(object sender, RoutedEventArgs e)
{
CheckBox ckb = sender as CheckBox;
TocItem data = ckb.DataContext as TocItem;
if (ckb.Tag.ToString().ToLower() == "new")
{
ckb.Tag = "";
data.ItemChecked += _itemChecked;
}
}
It's likely the source of your issue. I guess this would need little change either to initialize the event handler another way or to avoid usage of this event. My 2 cts : - remove this event - make IsChecked virtual in TOCItem - override IsChecked in TOCLayer and TOCService for doing the job (which is in _itemChecked today) - use a basic twoway binding between IsChecked and the UI Note that this sample is not provided by ESRI so you won't modify it from ourself:)
... View more
07-28-2010
02:04 AM
|
0
|
0
|
1978
|
|
POST
|
If the symbology is set in your feature layer service, the SL API will use it if you don't set manually any other symbology. In short, come back to your previous version 🙂
... View more
07-28-2010
01:51 AM
|
0
|
0
|
1161
|
|
POST
|
It's OK to use Silverlight API 2.0 with ArcGIS server 9.3.1 (but obviously yo won't be able to take avantage of the new server 10.0 possibilities such as feature layer symbology).
... View more
07-28-2010
01:49 AM
|
0
|
0
|
441
|
|
POST
|
Using this code below (which includes your changes from the other post, thanks) how can I simply add it as another ToolBarItem? I tried that and an error gets thrown stating that the property content is set more than once. This should work:
<esriToolkit:ToolbarItem Text="Measure">
<esriToolkit:ToolbarItem.Content>
<Button Style="{StaticResource MenuItem}" Click="DisableDrawObject" HorizontalAlignment="Right" Foreground="Black" Content="Measure" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<esriBehaviors:MeasureAction
AreaUnit="SquareMiles"
DisplayTotals="True"
DistanceUnit="Miles"
MapUnits="DecimalDegrees"
MeasureMode="Polygon"
FillSymbol="{StaticResource DefaultFillSymbol}"
TargetName="MyMap"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</esriToolkit:ToolbarItem.Content>
</esriToolkit:ToolbarItem Text="Measure">
... View more
07-27-2010
04:36 AM
|
0
|
0
|
1594
|
|
POST
|
The problem is that when you select the 'ZoomIn' button and then the 'Measure' button, the 2 tools are active and are listening to map click event (==> random result depending on event order). When you click on the measure tool you need to disable the other tools. Example : add this code:
private void DisableDrawObject(object sender, RoutedEventArgs e)
{
MyDrawObject.IsEnabled = false;
}
And call it when the user clicks the measure button: <Button Style="{StaticResource MenuItem}" Click="DisableDrawObject"
Content="Measure" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<esriBehaviors:MeasureAction
AreaUnit="SquareMiles"
DisplayTotals="True"
DistanceUnit="Miles"
MapUnits="DecimalDegrees"
MeasureMode="Polygon"
FillSymbol="{StaticResource DefaultFillSymbol}"
TargetName="MyMap"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
... View more
07-27-2010
03:22 AM
|
0
|
0
|
607
|
|
POST
|
Except the focus issue which is discuted here http://forums.arcgis.com/threads/9043-Losing-the-focus-of-the-Tool, I think you can just add a new toolbar item containing your button.
... View more
07-27-2010
02:59 AM
|
0
|
0
|
1594
|
|
POST
|
You need to initialize a feature symbol or a renderer (else the graphics won't be rendered). As it's a polygon layer, your symbol must be a FillSymbol
... View more
07-27-2010
02:56 AM
|
0
|
0
|
1161
|
| 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
|