POST
|
I cannot get GDAL to build anymore with this library. http://trac.osgeo.org/gdal/ticket/4588 Any thoughts on what I might be doing wrong on my 64bit CENTOS box? Suggestions on getting it to work? Adam
... View more
03-28-2012
09:23 AM
|
0
|
0
|
467
|
POST
|
I am having the same error. Does anyone know how to fix this? A
... View more
03-28-2012
05:08 AM
|
0
|
0
|
132
|
POST
|
All, Is it possible to embed a graphic inside a FGDB? I am interested in storing image chips to use as quick reference information in the DB and am stuck on how to accomplish this. Any ideas would be greatly appreciated. I just came across this guy...http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Adding_raster_datasets_as_attributes_in_a_feature_class/009t000001np000000/ Is there a way to do this programatically? Regards, Adam
... View more
10-06-2011
06:48 AM
|
0
|
1
|
1514
|
POST
|
Thanks Dominique, That worked to change the display name but to make the layer completely invisible I get the following error. Property or indexer 'ESRI.ArcGIS.Client.Toolkit.Primitives.LayerItemViewModel.IsVisible' cannot be assigned to -- it is read only case "GeocodeResultsGraphicsLayer":
e.LayerItem.IsVisible = false;
//e.LayerItem.Label = "Geocode result";
break; Why would the visibility be read only? Adam
... View more
05-17-2011
05:57 AM
|
0
|
0
|
224
|
POST
|
All, My app has several Graphics layers that are generated dynamically based on specific query results and whatnot. My esri:Map container looks like this: <esri:Map x:Name="Map" Loaded="Map_Loaded" Extent="-15000000,2000000,-7000000,8000000" ExtentChanged="Map_ExtentChanged" MouseMove="Map_MouseMove"
Grid.Row="1" Grid.Column="0">
<esri:ArcGISTiledMapServiceLayer ID="AGOLayer" Visible="True"
Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
<esri:WmsLayer ID="Nexrad" Opacity="0.5" SkipGetCapabilities="True" Initialized="WmsLayer_Initialized" Visible="True" />
<esri:GraphicsLayer ID="ContextGraphicsLayer" x:Name="TestLayer"></esri:GraphicsLayer>
<esri:GraphicsLayer ID="GeocodeResultsGraphicsLayer">
<esri:GraphicsLayer.MapTip>
<Grid>
<Border BorderBrush="Black" CornerRadius="10" BorderThickness="1" Background="#FFFFE300" />
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Text="{Binding [DisplayName]}" HorizontalAlignment="Left" />
</StackPanel>
</Grid>
</esri:GraphicsLayer.MapTip>
</esri:GraphicsLayer>
<esri:GraphicsLayer ID="SelectionGraphicsLayer"
MouseEnter="GraphicsLayer_MouseEnter"
MouseLeave="GraphicsLayer_MouseLeave" />
</esri:Map> In my Legend the names of the GraphicsLayers are based on the ID and not not really all that appealing. eg. SelectionGraphicsLayer, GeocodeResultsGraphicsLayer and ContextGraphicsLayer. My question is can I change or alias these names when they are displayed in the Legend? Thanks, Adam
... View more
05-16-2011
09:53 AM
|
0
|
3
|
2279
|
POST
|
All, My app is not based on the SilverlightViewer21 as you see in the link below. http://phldemo.esri.com/SilverlightViewer21/default.aspx?Theme=AliceBlue I really want to incorporate the measurement tools in to my own application but they are very much tied to the Widget framework that the application provides. Of course I can replicate the look and feel but how would I go about decoupling the tool as a "widget"? Has anyone tackled this before? I would like any advise on how to implement this outside of the Sample Silverlight Viewer framework. Any help on this would be greatly appreciated. Thanks, Adam
... View more
05-01-2011
10:19 AM
|
0
|
1
|
3158
|
POST
|
We ended up going pretty lean on the exporter. The method we implemented is as follows private void Map2PDF_Click(object sender, RoutedEventArgs e)
{
/* // Don't need the ExportPDF dialog anymore
CMC_Viewer.Views.ExportPDF map2pdf = new CMC_Viewer.Views.ExportPDF();
map2pdf.SetMap(this.Map);
map2pdf.Show();
* */
// Display save-as dialog
SaveFileDialog dialog = new SaveFileDialog();
dialog.Filter = "PDF|*.pdf";
if (!dialog.ShowDialog().Value)
{
return;
}
// Create a new dynamic layer from the same map service as current tiled layer
ArcGISTiledMapServiceLayer tiled = this.Map.Layers[0] as ArcGISTiledMapServiceLayer;
ArcGISDynamicMapServiceLayer dynamic = new ArcGISDynamicMapServiceLayer()
{
Url = tiled.Url,
ImageFormat = ArcGISDynamicMapServiceLayer.RestImageFormat.JPG
};
// When the dynamic layer has initialized create the in-memory PDF document
dynamic.Initialized += (a, b) =>
{
dynamic.GetUrl(this.Map.Extent,
(int)this.Map.ActualWidth,
(int)this.Map.ActualHeight,
delegate(string url, int width, int height, Envelope extent)
{
// Download a new image of identical to what is currently displayed in the map
WebClient webClient = new WebClient();
webClient.OpenReadCompleted += (c, f) =>
{
// Use the dispatcher to force execution in the UI thread
Dispatcher.BeginInvoke(delegate()
{
// Create the PDF document, set document information properties
PdfDocument document = new PdfDocument();
document.Info.Title = "Map";
// Create a new page with the same dimensions as the browser map
PdfPage page = new PdfPage(document)
{
Height = new XUnit(this.Map.ActualHeight, XGraphicsUnit.Presentation),
Width = new XUnit(this.Map.ActualWidth, XGraphicsUnit.Presentation)
};
document.Pages.Add(page);
// Create a graphics object for writing to the page
XGraphics graphics = XGraphics.FromPdfPage(page);
// Add the map image to the page
XImage image = XImage.FromStream(f.Result);
graphics.DrawImage(image, 0d, 0d);
// Save the PDF document to the user specified filename
document.Save(dialog.OpenFile());
// Notify the user that we're done
MessageBox.Show("Map saved to '" + dialog.SafeFileName + "'");
});
};
webClient.OpenReadAsync(new Uri(url));
});
};
dynamic.Initialize();
} We found that the size of the map to be exported has to be set better than in other examples. Anyway, the code above produces a high quality map.
... View more
04-07-2011
11:08 AM
|
0
|
0
|
546
|
POST
|
I am building a Silverlight Business Application that has several data-driven pages associated with it. I swapped out the default "About" page routing with a click event to call up ExportPDF as a childwindow. This opens ExportPDF.xaml just fine and even allows me to create a PDF but when it gets in to the guts of the PDF creation I get the Map not set error. This leads me to believe that MainPage can't find where I defined Map. All files reference the same namespaces and everything but still nothing. I hope this helps to clarify. Adam
... View more
03-01-2011
10:54 AM
|
0
|
0
|
546
|
POST
|
I believe the problem here is that MainPage can't see Home.xaml where I've defined my Map. Does anyone have any suggestions on how to get the two talking without using some kind of delegate? Thanks in advance, Adam
... View more
03-01-2011
10:35 AM
|
0
|
0
|
546
|
POST
|
Thanks Mark, Those are the example I am going by. I added those files to my project and even changed the name back to the original ExportPDF.xaml and it still can't find the map. The only difference is that have now changed it to a ChildWindow rather than a control. using ESRI.ArcGIS.Client;
using CMC_Viewer.Utils;
public interface IParentDialog
{
void SetStatus(string sStatus);
void TaskCompleted(bool bSuccessful);
}
namespace CMC_Viewer.Views
{
public partial class ExportPDF : ChildWindow, IParentDialog
{
private PDFExporter _Exporter;
private bool _bTwoStage = false;
private bool _bFirst = false;
private const string sOKMsg = "OK";
private const string sFailedMsg = "Failed";
private const string sStartMsg = "Click 'Start' to generate image.";
private const string sStartLabel = "Start";
private const string sFinishMsg = "Click 'Finish' to create PDF.";
private const string sFinishLabel = "Finish";
public ExportPDF()
{
InitializeComponent();
_Exporter = new PDFExporter();
_Exporter.SetParent(this);
lblStatus.Content = sOKMsg;
btnOK.Content = sStartLabel;
btnOK.Click += btnOK_Click;
chkExportOption.Checked += chkExportOption_Checked;
chkExportOption.Unchecked += chkExportOption_Unchecked;
}
// Methods called by the MainPage
public void SetMap(Map TheMap)
{
_Exporter.SetMap(TheMap);
}
public void AddElement(UIElement TheElement)
{
_Exporter.AddElement(TheElement);
} <controls:ChildWindow
x:Class="CMC_Viewer.Views.ExportPDF"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
mc:Ignorable="d"
d:DesignHeight="60" d:DesignWidth="280" > MyMap and TheMap do not exist in my Project and I always use plain old "Map" to define the canvas. Do you think this is the problem? I haven't touched PDFExporter.cs either and there is the SetMap method that implements the Type, "Map". Adam
... View more
03-01-2011
08:11 AM
|
0
|
0
|
546
|
POST
|
Hi Mark, To which code are you referring to? Can you pls give me a file to look at as there are several projects out there and I am all kinds of confused at this point. Thanks, Adam
... View more
03-01-2011
07:39 AM
|
0
|
0
|
461
|
POST
|
All, I have yet to get this thing working. I added a click event to a button in my silverlight business application which calls the code example from here. http://www.pierssen.com/arcgis10/silverlight.htm private void Map2PDF_Click(object sender, RoutedEventArgs e)
{
Map2PDF map2pdf = new Map2PDF();
map2pdf.Show();
} I changed the file type from a UserControl to a ChildWindow and the dialog does invoke, I just can't seem to get it to find the map and all of it's elements. I keep getting the "Map not Set" error. Does anyone have an idea on how to fix this? In Home.xaml I have defined the map part as <esri:Map x:Name="Map" Loaded="Map_Loaded" Extent="-15000000,2000000,-7000000,8000000"> The app still cannot find the Map. Thanks in advance, Adam
... View more
03-01-2011
06:27 AM
|
0
|
0
|
461
|
POST
|
If @billdollins were sitting here next to me I would get a slap in the head but I have to ask anyway...There is an example in the samples gallery (http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SubLayerList) that displays the sublayer list of a particular service. I don't want mine to display by default like this one does but rather allow the user to check which layers they would like to see interactively. I am new to silverlight and this xaml makes no sense to me. Can anyone suggest how to disable each layer being viewed/visible when the page loads. <ListBox Margin="0,5,0,0" ItemsSource="{Binding ElementName=MyMap, Path=Layers.[DynamicLayerCalifornia].Layers}"
Grid.Row="1">
<ListBox.ItemTemplate>
<DataTemplate>
<CheckBox Margin="2"
Name="DynamicLayerCalifornia"
Content="{Binding Name}"
IsChecked="{Binding DefaultVisibility}"
Tag="{Binding ID}"
ClickMode="Press"
Click="CheckBox_Click" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox> Thanks, Adam
... View more
02-24-2011
09:31 AM
|
0
|
2
|
503
|
POST
|
The only difference I can see is that mine uses the full URL including the http:// Http://localhost:1234/proxy.ashx?URL=http://earthquakefeed.xml Adam
... View more
02-21-2011
05:47 PM
|
0
|
0
|
498
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|