|
POST
|
You can change the style of the OverviewMap by using Blend: - Right click on your overview map. - Edit template - Edit a copy Then you can edit the UIElement called AOI.
... View more
10-28-2010
07:04 AM
|
0
|
0
|
394
|
|
POST
|
You have to create a dependency property by code. You can use the code that Jennifer gave:
public Map Map
{
get { return GetValue(MapProperty) as Map; }
set { SetValue(MapProperty, value); }
}
public static readonly DependencyProperty MapProperty = DependencyProperty.Register("Map",
typeof(Map), typeof(ClosestFacilityControl), new PropertyMetadata(OnMapPropertyChanged));
.......
With your xaml code: <esri:Map x:Name="_Map" Background="White" Extent="-117.23,34.03,-117.16,34.08" >
....
</esri:Map>
you are creating a new map but not a property which can be set to a map.
... View more
10-28-2010
06:57 AM
|
0
|
0
|
2009
|
|
POST
|
I agree with Dan, at first glance it could mean that the element referenced by your targetname is not existing. Take care that your TargetName is called 'LayoutRoot' so you should have something like:
<Grid x:Name="LayoutRoot">
<Grid.RenderTransform>
<ScaleTransform />
</Grid.RenderTransform>
......
... View more
10-28-2010
06:53 AM
|
0
|
0
|
1665
|
|
POST
|
There is a sample of a shapefile reader here : http://esrislcontrib.codeplex.com/
... View more
10-28-2010
06:49 AM
|
0
|
0
|
744
|
|
POST
|
One issue is that you didn't bind the Textblock to Symbol.Text:
<TextBlock x:Name="Element" FontFamily="Arial" FontSize="16" Foreground="Red" Text="{Binding Symbol.Text}">
That being said, it doesn't fully explain your issue because you shoud get a fixed string : "ABC". Perhaps an issue with the geometry of your graphic. How did you initialize it?
... View more
10-26-2010
11:29 AM
|
0
|
0
|
751
|
|
POST
|
Some infos here : http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Map.html
... View more
10-26-2010
10:26 AM
|
0
|
0
|
596
|
|
POST
|
You could change the scalebar displayunit when the map extent changes. Something like (to adapt from your map units and the expected scalebar units): void Map_ExtentChanged(object sender, ExtentEventArgs e)
{
ScaleBarUnit scaleBarUnit;
double width = e.NewExtent.Width;
if (width < 10)
scaleBarUnit = ScaleBarUnit.Centimeters;
else if (width > 100000)
scaleBarUnit = ScaleBarUnit.Kilometers;
else
scaleBarUnit = ScaleBarUnit.Meters;
myScaleBar.DisplayUnit = scaleBarUnit;
} and XAML <esri:Map x:Name="Map" ExtentChanged="Map_ExtentChanged">
... View more
10-26-2010
10:21 AM
|
0
|
0
|
1108
|
|
POST
|
Hi, You can print text inforamtion along the map. You have to edit the mapPrinter template (for example with BLEND as described in this thread). As example, if you define this style:
<UserControl.Resources>
<controls:ToVisibilityConverter x:Key="toVisibility" />
<Style x:Key="mapPrinterStyle" TargetType="controls:MapPrinter">
<Setter Property="Foreground" Value="#FF333333"/>
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
<GradientStop Color="#FFFFFFFF" Offset="0"/>
<GradientStop Color="#FFF9FAFB" Offset="0.375"/>
<GradientStop Color="#FFE5E8EB" Offset="0.625"/>
<GradientStop Color="#FFCBD1D7" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFA3AEB9" Offset="0"/>
<GradientStop Color="#FF8399A9" Offset="0.375"/>
<GradientStop Color="#FF718597" Offset="0.375"/>
<GradientStop Color="#FF617584" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Height" Value="1050" />
<Setter Property="Width" Value="750" />
<Setter Property="ExtentFillSymbol">
<Setter.Value>
<esri:SimpleFillSymbol Fill="#05FF0000" BorderBrush="Red" BorderThickness="2" />
</Setter.Value>
</Setter>
<Setter Property="PageFillSymbol">
<Setter.Value>
<esri:SimpleFillSymbol Fill="#050000FF" BorderBrush="Blue" BorderThickness="2" />
</Setter.Value>
</Setter>
<Setter Property="TextSymbol">
<Setter.Value>
<esri:MarkerSymbol >
<esri:MarkerSymbol.ControlTemplate>
<ControlTemplate>
<TextBlock RenderTransformOrigin="0,0" Text="{Binding Attributes[Page]}" FontSize="72" Foreground="#800000FF">
<TextBlock.RenderTransform>
<CompositeTransform TranslateX="-35" TranslateY="-50" ScaleX="1" ScaleY="1" />
</TextBlock.RenderTransform>
</TextBlock>
</ControlTemplate>
</esri:MarkerSymbol.ControlTemplate>
</esri:MarkerSymbol>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:MapPrinter">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0">
<Border Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" Margin="0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition />
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- Header -->
<TextBlock Text="{TemplateBinding PrintDocumentName}" HorizontalAlignment="Center" FontSize="12" Grid.Row="0" Grid.ColumnSpan="2"
Visibility="{Binding PrintDocumentName, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource toVisibility}}"/>
<!-- Body-->
<StackPanel Grid.Row="1" Grid.Column="0">
<TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus at leo eu dolor rhoncus lacinia at a elit. Praesent in justo tellus, in consectetur magna. Vivamus nec velit urna, ut posuere odio. Quisque placerat odio id nibh bibendum tristique. Suspendisse ullamcorper mauris in turpis adipiscing cursus. Nullam malesuada ultricies elit id sodales. Nam tincidunt, enim at dapibus facilisis, quam nulla iaculis dolor, vel eleifend nisi ligula at massa. Integer aliquam vestibulum velit, sed vestibulum neque sollicitudin at. Vestibulum magna diam, porta in varius ut, tempus nec mi. Proin rhoncus lacinia tortor, et laoreet neque tincidunt in. Cras varius sagittis augue sed congue. Fusce ipsum enim, iaculis quis luctus nec, facilisis ac sem.
In tortor orci, tempus vel accumsan a, rhoncus vitae arcu. Praesent nisl diam, lobortis et venenatis vitae, pretium eget felis. In porta mi vel libero mattis vel bibendum felis tempus. Vestibulum vehicula suscipit hendrerit. Praesent luctus mattis lorem. Vivamus pharetra nunc placerat tortor consequat a tempus leo aliquam. Etiam iaculis lacus quis tortor porta gravida. Duis congue hendrerit sem, sed consectetur justo sollicitudin eu. Sed fringilla tortor et tortor ullamcorper vitae pulvinar orci luctus. Ut egestas ullamcorper nibh, nec venenatis nulla suscipit sed. In nec quam leo, at fermentum nisi.
Curabitur at pretium ligula. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce porttitor, risus eget rhoncus lobortis, felis leo placerat turpis, eget aliquam odio nibh non massa. Integer vel nunc sem, vel lacinia enim. Ut auctor erat ut nisl tristique eget sodales risus gravida. Duis velit dolor, porta eu posuere ac, hendrerit ac nisl. Nam id molestie ante. Sed molestie sodales purus, malesuada dictum nisi sollicitudin a. Nulla mattis auctor turpis, non tempus nisl tempor a. Donec vel libero vitae elit congue sollicitudin.
Nullam volutpat bibendum convallis. Nulla id urna nunc. Donec molestie volutpat risus, ac accumsan est tristique non. Aliquam commodo, nisi quis luctus consequat, leo ligula blandit sapien, hendrerit sagittis nisi nisl a dui. Maecenas varius leo ut ante pellentesque euismod. Praesent placerat ornare ante id tincidunt. Cras scelerisque lacinia facilisis. Aenean felis odio, imperdiet nec porttitor nec, pulvinar id urna. Phasellus congue lectus vitae nisi commodo nec blandit leo accumsan. Nullam ultrices lectus id quam vestibulum in molestie leo malesuada. Cras augue orci, mattis in hendrerit et, tincidunt vel urna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin vestibulum tortor in leo feugiat aliquet. Duis nulla mauris, malesuada sed molestie id, imperdiet vitae nisi. Phasellus facilisis aliquam sem, ac porta dolor euismod bibendum.
" />
</StackPanel>
<Grid Grid.Row="1" Grid.Column="1">
<!-- Map-->
<!--<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">-->
<esri:Map x:Name="PrintMap" IsLogoVisible="False" />
<!--</Border>-->
<!-- Scale Bar -->
<esri:ScaleBar Map="{Binding ElementName=PrintMap}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="20,0,0,10" Grid.Row="1" TextColor="Black"/>
</Grid>
<!-- Footer -->
<TextBlock TextWrapping="Wrap" Grid.Row="2" Grid.ColumnSpan="2"
Text="Duis elit tortor, sollicitudin in pharetra ut, facilisis fringilla nisi. Donec tortor est, rhoncus dapibus pretium quis, sollicitudin in neque. Morbi rhoncus tincidunt nulla. Vestibulum tincidunt suscipit sem, ut ultrices elit sollicitudin eu. Nunc dapibus venenatis augue id iaculis. Proin porta pulvinar augue id lobortis. Vivamus in vestibulum libero. Fusce ac purus eget ante sollicitudin porttitor. Morbi convallis, mi a consequat elementum, odio mauris suscipit diam, eu consectetur sem enim vitae lacus. Sed dictum massa eu sem vehicula adipiscing. Donec vitae nunc id nisl blandit lobortis in eget tellus. In sit amet tincidunt elit. Praesent ac turpis eget nibh laoreet varius nec sit amet magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. "/>
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Bottom" Grid.Row="3"
Text="{Binding Now, StringFormat='Printed {0:d} '}" />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Bottom" Grid.Row="3" Grid.ColumnSpan="2"
Text="{Binding Scale, StringFormat='1 : {0:F0} '}" />
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Grid.Row="3" Grid.ColumnSpan="2">
<TextBlock Text="{Binding CurrentPage, RelativeSource={RelativeSource TemplatedParent}, StringFormat='Page {0} '}" />
<TextBlock Text="{Binding PageCount, RelativeSource={RelativeSource TemplatedParent}, StringFormat='/ {0}'}" />
</StackPanel>
</Grid>
</Border>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
and use it as style for your mapPrinter:
<controls:PrintPreview x:Name="PrintPreview" Background="{StaticResource CommonBackgroundBrush}" >
<controls:MapPrinter Map="{Binding ElementName=Map}" PrintDocumentName="Tour de France 2010" IsActive="True" Height="1050" Width="750"
Style="{StaticResource mapPrinterStyle}"
IsScaleFixed="True" Scale="2000000" PrintExtent="-400000, 5230000, 840000, 6870000"
BorderBrush="DarkBlue" BorderThickness="1" Foreground="White" Background="MediumSlateBlue" />
</controls:PrintPreview>
You will get a result looking like the attached document. �??
... View more
10-25-2010
05:29 AM
|
0
|
0
|
2973
|
|
POST
|
Is it possible to print to PDF file (like export to PDF file), instead of print to printer driver? You can use a PDF printer driver. For example, these PDF : A4, A3, A2, A0, A4 4 pages, A4 16 pages have been generated with PDFCreator as printer driver.
... View more
10-14-2010
11:15 AM
|
0
|
0
|
2973
|
|
POST
|
Thanks Dominique, but when I try to change the template programmatically the print preview goes blank. I didn't reproduce the issue. I tested by changing programmaticaly the template (with the control template of my previous mail) and it's working well.
ControlTemplate dt = (ControlTemplate)Resources["myMapPrinterCT"];
mapPrinterWithPreview.Template = dt;
I tested also changing the style programmaticaly : looks OK. I would need more info on how to reproduce your issue. Thanks.
... View more
10-14-2010
11:10 AM
|
0
|
0
|
2973
|
|
POST
|
To change the layout of the page with Blend: Right click on the map printer control Select 'Edit Template' Select 'Edit a Copy' Accept the creation of the new style You can now change the page layout Basically, the template property in XAML looks by default like this:
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:MapPrinter">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0">
<Border Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" Margin="0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition />
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Header -->
<TextBlock Text="{Binding PrintDocumentName}" HorizontalAlignment="Center" FontSize="12" Grid.Row="0"
Visibility="{Binding PrintDocumentName, Converter={StaticResource toVisibility}}"/>
<!-- Body-->
<Grid Grid.Row="1">
<!-- Map-->
<esri:Map x:Name="PrintMap" IsLogoVisible="False" />
<!-- Scale Bar -->
<esri:ScaleBar Map="{Binding ElementName=PrintMap}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="20,0,0,10" Grid.Row="1" TextColor="Black"/>
</Grid>
<!-- Footer -->
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Bottom" Grid.Row="2"
Text="{Binding Now, StringFormat='Printed \{0:d\} '}" />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Bottom" Grid.Row="2"
Text="{Binding Scale, StringFormat='1 : \{0:F0\} '}" />
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Grid.Row="2">
<TextBlock Text="{Binding CurrentPage, StringFormat='Page \{0\} '}" />
<TextBlock Text="{Binding PageCount, StringFormat=/ \{0\}}" />
</StackPanel>
</Grid>
</Border>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
By changing this template, you will change the layout of the page.
... View more
10-13-2010
06:43 AM
|
0
|
0
|
2264
|
|
POST
|
If the SiteID is coming from a dictionary, the code should be:
{Binding Path=[Site_ID], Converter={StaticResource MySiteNameConverter}}
... View more
10-10-2010
08:44 AM
|
0
|
0
|
1080
|
|
POST
|
You converter is using the main value as SiteID. So, you should get the site name if the source of your binding is the siteID. Assuming that you declare MySiteNameConverter in the resources et that the property SiteID is giving the siteID, it should be something like:
{Binding Path=SiteID, Converter={StaticResource MySiteNameConverter}}
... View more
10-09-2010
02:36 AM
|
0
|
0
|
1080
|
|
POST
|
Can arcgis silverlight identifytask work on multiple layer ids? Yes, you can either identify on all layers of a map service or you can specify the layers by the LayerIds parameter. Can you identify on a POLYGON AOI instead of just a point? Yes, the valid geometry types are Envelope, Point, Multipoint, Polyline, or Polygon. I have multiple map services Here, you need multiple identify tasks. In this sample , the identify user control is identifying on all visible map services. You can test it on these webmaps (for example).
... View more
10-09-2010
02:27 AM
|
0
|
0
|
1604
|
|
POST
|
using Map.ZoomTo(dmsLayer.FullExtent); takes to the extent of the dynamic map service, not the visible features, There is no way with the REST API and so with the SL API to get a layer extent taking in care the layer definition. is there a updated handler for a dynamic map service to try and call after the layer def is completed No, because the request with a layer def is stateless. It's only used for one exportmap operation. What would be the best way to accomplish this? A GP tool or a Server Object Extension (SOE) should be able to accomplish this.
... View more
10-06-2010
11:44 PM
|
0
|
0
|
403
|
| 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
|