|
POST
|
These Binding causes the BAD_PARSER_VALUE. I think you meant to put {Binding Attributes[API]} and {Binding Attributes[Operator]}. Jennifer Both on the same line where TextBlock=? Can you show me what you mean based on my code? Thanks
... View more
08-13-2010
05:38 AM
|
0
|
0
|
462
|
|
POST
|
http://help.arcgis.com/en/webapi/silverlight/help/index.html Look under General Reference/Coordinate system ids Thanks, this worked for me http://resources.esri.com/help/9.3/arcgisserver/apis/rest/pcs.html
... View more
08-04-2010
10:42 AM
|
0
|
0
|
571
|
|
POST
|
This worked. http://resources.esri.com/help/9.3/arcgisserver/apis/rest/pcs.html
... View more
08-04-2010
10:41 AM
|
0
|
0
|
16660
|
|
POST
|
I'm hoping to find a list of the Spatial References and their WKID. I know I have seen this before but am having trouble finding it again. Below is sample code from the Resource center on how to change the projection of the map. I need to find the WKID of other spatial references to use. Many thanks <esri:Map.Extent>
<esri:Envelope XMin="661140" YMin="-1420246" XMax="3015668" YMax="1594451" >
<esri:Envelope.SpatialReference>
<esri:SpatialReference WKID="26777"/>
</esri:Envelope.SpatialReference>
</esri:Envelope>
</esri:Map.Extent>
... View more
08-04-2010
10:20 AM
|
0
|
2
|
990
|
|
POST
|
That actualy isn't hard. see this:
private void MyMap_MouseMove(object sender, MouseEventArgs e)
{
//If you change LayoutRoot to any object that appears on the screen, the spacial
//reference to the coordinates change, so, if you want the map coordinates,
//you can change it to MyMap
mousePosition.Text = string.Format("X: {0}, Y:{1}", e.GetPosition(LayoutRoot).X.ToString(), e.GetPosition(LayoutRoot).Y);
mousePosition.Text = string.Format("X: {0}, Y:{1}", e.GetPosition(MyMap).X.ToString(), e.GetPosition(MyMap).Y);
}
This should fix it! Just to be sure, if your map is inside an ScrollViwer or a ChildWindow, this code Won't work well (i tried once, and i'm still trying to fix code for the childwindow) Ok, thanks
... View more
08-04-2010
10:15 AM
|
0
|
0
|
761
|
|
POST
|
well, I'm still new to silverlight, but in theory this code prevents the error, because the call that overrides the event MouseEnter, MouseMove and MouseLeave is only triggered after the map finishes loading, and, as I understood from your first post, the error ocurred because the map still didn't have an object instance. Hi jonatas- That did work, thanks. In your MyMap_MouseMove, it doesn't seem to return the actual XY's from the Map. I'm guessing they are just the page XY's?? do you know how I can fix that? -Thanks
... View more
08-04-2010
08:40 AM
|
0
|
0
|
761
|
|
POST
|
Hi I have a question on your code. at mousePosition.Text I'm getting "mouseposition" does not exist. Can you offer me some advice on that? Thanks Ok I see that I left that out of my XAML. So when user loads the web application and they hover over the map before the page loads your code will let the page load without an error occuring?? Regards,
... View more
08-04-2010
06:15 AM
|
0
|
0
|
761
|
|
POST
|
Hi, I made a Small Application to demonstrate a possible solution to your problem. the Xaml has a Map and a Border with a TextBox that Show the mouse position on the screen or OOB (out of border) if the mouse is out of the map. here's the code: XAML:
<UserControl x:Class="MouseOverTest.MainPage"
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:esri="http://schemas.esri.com/arcgis/client/2009"
mc:Ignorable="d" d:DesignWidth="780" d:DesignHeight="480"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:ei="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
xmlns:userControls="clr-namespace:ESRI.ArcGIS.SilverlightMapApp"
xmlns:actions="clr-namespace:ESRI.ArcGIS.SilverlightMapApp.Actions">
<Grid x:Name="LayoutRoot">
<!-- Map Control -->
<esri:Map x:Name="MyMap" Background="White">
<esri:ArcGISTiledMapServiceLayer ID="BaseLayer"
Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
</esri:Map>
<Border BorderThickness="2" BorderBrush="Black" Height="50" Width="100" Margin="12,418,668,12">
<TextBlock Name="mousePosition"/>
</Border>
</Grid>
</UserControl>
CS:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Browser;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Markup;
using System.Windows.Shapes;
using System.ComponentModel;
using ESRI.ArcGIS.Client;
using System.Windows.Controls.Primitives;
namespace MouseOverTest
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
MyMap.Loaded += new RoutedEventHandler(MyMap_Loaded);
}
private void MyMap_Loaded(object sender, RoutedEventArgs e)
{
//choose what's best for your case
MyMap.MouseEnter += new MouseEventHandler(MyMap_MouseEnter);
MyMap.MouseMove += new MouseEventHandler(MyMap_MouseMove);
MyMap.MouseLeave += new MouseEventHandler(MyMap_MouseLeave);
}
private void MyMap_MouseEnter(object sender, MouseEventArgs e)
{
mousePosition.Text = string.Format("OOB");
}
private void MyMap_MouseMove(object sender, MouseEventArgs e)
{
mousePosition.Text = string.Format("X: {0}, Y:{1}", e.GetPosition(LayoutRoot).X.ToString(), e.GetPosition(LayoutRoot).Y);
}
private void MyMap_MouseLeave(object sender, MouseEventArgs e)
{
mousePosition.Text = string.Format("OOB");
}
}
}
I Hope this is useful XD Hi I have a question on your code. at mousePosition.Text I'm getting "mouseposition" does not exist. Can you offer me some advice on that? Thanks
... View more
08-04-2010
06:10 AM
|
0
|
0
|
761
|
|
POST
|
I'm hoping to find a list of WKID values that corespond to their coordnate system's. Specifically USA Contiguous Lambert Conformal Conic. I swear I saw this on EDN site but can't find this list anywhere. Please advise. Many thanks
... View more
08-04-2010
05:03 AM
|
0
|
8
|
43510
|
|
POST
|
When my Silverlight App is loading in the browser, if I have my mouse hovering over the map area I will get a "Object reference not set to an instance of an object". The error states this occured in MyMap_MouseOver event. The App will load fine as long as the mouse cursor is not on the map when the App is loading but I can't take the chance a user will do that. Does someone have some suggestions? many thanks.
... View more
08-04-2010
04:03 AM
|
0
|
7
|
1120
|
|
POST
|
Ok I see what the problem is now. I'm getting an Object Reference not set to an instance (MyMap_MouseOver) due to the users mouse being on the map as it loads. How can I prevent this error from occuring? Thanks,
... View more
08-03-2010
12:05 PM
|
0
|
0
|
274
|
|
POST
|
Hello All- I created a basic Silverlight App (version 3.0) about a week ago along with a basic MapService that it consumes. Today I made a different MapService and pointed my Silverlight App to consume that. I then used my machine to access that Silverlight App and it first threw an error because I think it had cached the old mapservice data. Does that sound right? I then Cleared the Cache on that server and on my machine using the http://localhost/ArcGIS/rest/admin and it began working on my machine eventually. Well next I tried it from a different machine in the office and am still getting that error. I do have a clientaccesspolicy.xml file and everything so is there some kind of caching step I missed?
... View more
08-03-2010
10:44 AM
|
0
|
1
|
801
|
|
POST
|
Please take a look at the following links to see how you can use hierarchical data bindings in a tree view control: http://blogs.silverlight.net/blogs/justinangel/archive/2008/11/18/silverlight-toolkit-treeview-treeviewitem-amp-hierarchaldatatemplate.aspx http://geekswithblogs.net/tkokke/archive/2009/06/29/styling-a-treeview-in-silverlight-and-blend-3.aspx And for data bindings, you should use {Binding ElementName=MyMap, Path=Layers} for the root node(s) and {Binding ElementName=MyMap, Path=Layers.[1].Layers} for your group layer. Hope this helps. Hi Ali- Any chance I can create/add this tree view using just Visual Studio? This looks promising. Regards, -Josh
... View more
08-02-2010
03:34 AM
|
0
|
0
|
486
|
|
POST
|
Is there a way to show group layers in a tree view in Silverlight 3.0? In the sample code below it will show the group layer names but it's just a vertical list of check boxes instead of a tree view. Regards, <Border Background="#CC5C90B2" BorderThickness="1" CornerRadius="5"
HorizontalAlignment="Left" VerticalAlignment="Top"
Margin="20,20,20,30" Padding="10" BorderBrush="Black">
<Border.Effect>
<DropShadowEffect/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="15" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Text="Layers in Test Service" FontWeight="Bold" Grid.Row="0" />
<ListBox Margin="0,5,0,0" ItemsSource="{Binding ElementName=MyMap, Path=Layers.[1].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>
</Grid>
</Border>
... View more
07-30-2010
06:50 AM
|
0
|
2
|
880
|
|
POST
|
It's controlled by the MinimumResolution of the map. We can set it to a low value to allow more zooming in (but you'll eventually get no data from a zoom level). Thanks, that worked
... View more
07-30-2010
05:19 AM
|
0
|
0
|
364
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-15-2023 01:27 PM | |
| 1 | 05-02-2017 11:40 AM | |
| 1 | 06-16-2010 08:09 AM | |
| 1 | 05-02-2017 10:04 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-16-2025
02:03 PM
|