|
POST
|
I'd like to use ESRI.ArcGIS.Client.Printing, but can't find any documentation showing how to get started. Is there any available? Thanks!
... View more
10-22-2011
05:41 AM
|
0
|
0
|
516
|
|
POST
|
With SDK version 2.2, I have a View with a tabcontrol where its itemssource is bound to an ObserveableCollection of GraphicsLayers on a ViewModel. <TabControl ItemsSource="{Binding Layers}" Grid.Row="3" Grid.ColumnSpan="3">
<TabControl.ItemTemplate>
<DataTemplate>
<TabItem >
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding ID}"></TextBlock>
<Button Content="x" Margin="3" Command="{Binding ElementName=LayoutRoot,Path=DataContext.Delete}" CommandParameter="{Binding}"></Button>
</StackPanel>
</TabItem.Header>
</TabItem>
</DataTemplate>
</TabControl.ItemTemplate>
<TabControl.ContentTemplate>
<DataTemplate>
<Grid>
<toolkit:FeatureDataGrid Map="{Binding ElementName=LayoutRoot, Path=DataContext.Map}" GraphicsLayer="{Binding}"></toolkit:FeatureDataGrid>
</Grid>
</DataTemplate>
</TabControl.ContentTemplate>
</TabControl> Here's the ViewModel: public ObservableCollection<GraphicsLayer> Layers
{
get { return m_Layers; }
set
{
m_Layers = value;
RaisePropertyChange("Layers");
}
} The first time I add a graphicslayer to the viewmodel, it works fine. But I do see these errors: System.Windows.Data Error: 1 : Cannot create default converter to perform 'one-way' conversions between types 'System.Windows.Controls.DataGridHeadersVisibility' and 'System.Windows.Visibility'. Consider using Converter property of Binding. BindingExpression:Path=HeadersVisibility; DataItem='FeatureDataGrid' (Name=''); target element is 'Button' (Name=''); target property is 'Visibility' (type 'Visibility')
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='Column' BindingExpression:Path=HeadersVisibility; DataItem='FeatureDataGrid' (Name=''); target element is 'Button' (Name=''); target property is 'Visibility' (type 'Visibility')
System.Windows.Data Error: 1 : Cannot create default converter to perform 'one-way' conversions between types 'System.Windows.Controls.DataGridHeadersVisibility' and 'System.Windows.Visibility'. Consider using Converter property of Binding. BindingExpression:Path=HeadersVisibility; DataItem='FeatureDataGrid' (Name=''); target element is 'DataGridColumnHeadersPresenter' (Name='PART_ColumnHeadersPresenter'); target property is 'Visibility' (type 'Visibility')
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='Column' BindingExpression:Path=HeadersVisibility; DataItem='FeatureDataGrid' (Name=''); target element is 'DataGridColumnHeadersPresenter' (Name='PART_ColumnHeadersPresenter'); target property is 'Visibility' (type 'Visibility')
After I clear the collection then add a layer to the collection, I get a tab item, but no FeatureDataGrid. When I have multiple tabs showing (with featuredatagrids) and switch between them I get a unhandled exception crash. Is this a bug, or am I doing something wrong? Thanks!
... View more
10-21-2011
02:32 PM
|
0
|
1
|
858
|
|
IDEA
|
-->
A lot of users are having difficulty making the jump from VBA to .NET. Instead of requiring them to download Visual Studio and use add-ins, Esri should provide an option that is more similar to the good old VBA customization experience, leveraging codedom compiler. http://msdn.microsoft.com/en-us/library/system.codedom.compiler.aspx For the IDE, perhaps one similar to SharpDevelop, within desktop apps. http://sharpdevelop.net/opensource/sd/ As with VBA, the code modules would travel with the document. Unlike VBA, the same Arcmap singleton used in Add-ins would be provided. This would make it easy to migrate .NET code from the document to the add-in at a later time. I don't think storing code in mxt files is needed - make people use add-ins if they want to share customizations. Basically, it would be an add-in that is stored within the document, is edited with something like sharpdevelop, and compiled with CodeDom. Administrators should be able to configure a machine to either allow,alert, or deny running add-ins that are stored in documents.
... View more
09-29-2011
08:20 AM
|
4
|
1
|
682
|
|
POST
|
I'd like to provide the user the ability to click on a feature and see a popup and then highlight and ctrl-c to copy highlighted text onto the clipboard. Is there some way to configure the Infowindow to support this? If not is there some similar tool that supports this? I'd prefer not to use the FeatureDataForm. Thanks!
... View more
09-27-2011
03:10 PM
|
0
|
1
|
570
|
|
POST
|
Thanks Morten, I hadn't realized that client side projection is supported. That does simplify things. I guess the attached property can also replace IGraphic.Attributes with each KmlExtendedData in IGraphic.Attributes[extendedData] when Kml from fusion tables is added ... var kedList = g.Attributes["extendedData"] as List<KmlExtendedData>;
if (kedList != null)
{
g.Attributes.Clear();
foreach (KmlExtendedData ked in kedList)
{
g.Attributes.Add(ked.Name, ked.Value);
}
}
... View more
09-27-2011
12:17 PM
|
0
|
0
|
411
|
|
POST
|
Hey Dominique - I'm aware of that strategy. I really think 99% of the time anyone using a kmllayer will be wanting to display it in web mercator. So I think bending the no-projection-on-the-client rule makes sense in this situation. See more discussion here: http://forums.arcgis.com/threads/40409-Can-KmlLayer-project-to-Web-Mercator-on-the-fly
... View more
09-27-2011
09:15 AM
|
0
|
0
|
867
|
|
POST
|
Thanks Dominique ... It turns out it looks like I can set KmlLayer.Url to this url: http://www.google.com/fusiontables/exporttable?query=select+col8+from+1236296+&o=kmllink&g=col8
(Found using Fiddler and clicking download to kml from the fusion map page). Now the only pain is converting to web mercator. The code for the Kml sample sure will be a lot messier when Esri retires the WGS84 basemaps and replaces with web mercator. http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#KmlLayerSimple
... View more
09-27-2011
09:00 AM
|
0
|
0
|
867
|
|
POST
|
Hi - Is there a sample showing how to use KmlExtendedData somewhere? Thanks! Kirk
... View more
09-27-2011
08:52 AM
|
0
|
0
|
422
|
|
POST
|
All the kml files I've ever seen store coordinates in WGS84 coordinates. All kml viewers I've ever seen project the coordinates to Web mercator at display time. It seems to me that by default - or at least as an option - the KmlLayer should convert from WGS84 to web mercator behind the scenes. Or maybe it does, and I'm just missing something? Is this code really necessary? void layer_Initialized(object sender, EventArgs e)
{
var layer = sender as ESRI.ArcGIS.Client.Toolkit.DataSources.KmlLayer;
foreach (Graphic g in layer.Graphics)
{
var pnt = g.Geometry as MapPoint;
g.Geometry = ToWebMercator(pnt.X, pnt.Y);
}
}
public static MapPoint ToWebMercator(double lon, double lat)
{
// adapted from Oren Gal's post:
// http://www.gal-systems.com/2011/07/convert-coordinates-between-web.html
MapPoint pnt = new MapPoint() { SpatialReference = new SpatialReference(3857) };
if ((Math.Abs(lon) > 180 || Math.Abs(lat) > 90))
return pnt;
double num = lon * 0.017453292519943295;
double x = 6378137.0 * num;
double a = lat * 0.017453292519943295;
pnt.X = x;
pnt.Y = 3189068.5 * Math.Log((1.0 + Math.Sin(a)) / (1.0 - Math.Sin(a)));
return pnt;
}
... View more
09-27-2011
08:45 AM
|
0
|
2
|
1047
|
|
POST
|
Hey Dan - Thanks for responding! This makes sense. Does anyone know if Esri has exposed a method to convert Kml geometries to Esri geometries? The KmlLayer must be doing this somewhere behind the scenes. Kirk
... View more
09-27-2011
06:47 AM
|
0
|
0
|
867
|
|
POST
|
I've been asked to add a layer to a silverlight map depicting information in a Google Fusion Table, specifically this one: http://www.google.com/fusiontables/DataSource?snapid=S232942v7U3 Does anyone know an easy way to do this? Are there any plans to provide a new layer type in future versions of the Silverlight API that would let me just config a layer using the url like I would any other mapservice layer? Thanks, Kirk
... View more
09-26-2011
03:15 PM
|
0
|
8
|
3330
|
|
POST
|
Will ArcGIS runtime SDK for WPF be replacing ArcGIS API for WPF? Thanks, Kirk
... View more
09-23-2011
06:58 AM
|
0
|
1
|
429
|
|
POST
|
I'm writing a query tool that allows the user to perform sql queries. I'd like to present a message like this: Maximum record count reached, showing only the first 1000 records Is there some method to determine the max record count has been used to configure a particular map service? Thanks! Kirk
... View more
09-20-2011
06:19 PM
|
0
|
1
|
620
|
|
POST
|
Would it be possible (and feasible) for Esri to implement INotifyPropertyChanged on at least some of ArcObjects? AFAIK INotifyPropertyChanged is not dependent on WPF. It sure seems like it would make life easier though.
... View more
09-19-2011
10:05 AM
|
0
|
0
|
1189
|
|
POST
|
If you're running a really long job you might want to persist the jobId somewhere (like in a simple webservice or isolated storage). That way a user can check the status of a job after closing and re-opening their browser.
... View more
09-16-2011
10:55 AM
|
0
|
0
|
299
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-17-2015 10:41 AM | |
| 2 | 11-15-2012 05:22 AM | |
| 4 | 09-29-2011 08:20 AM | |
| 3 | 12-04-2015 08:50 AM | |
| 1 | 04-08-2010 09:34 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|