|
POST
|
You can update your color and width conversion this way.
symbol.Color = Color.FromArgb(Convert.ToByte(result.color[3]), Convert.ToByte(result.color[0]), Convert.ToByte(result.color[1]), Convert.ToByte(result.color[2]));
symbol.Width = Convert.ToDouble(pts, CultureInfo.InvariantCulture) * 96 / 72; // to convert from points to pixel units
... View more
10-27-2010
12:10 PM
|
0
|
0
|
867
|
|
POST
|
Correct me if I'm wrong. You are using the MapGesture.Hold to trigger an EditVertices where you pass the graphic as the CommandParameter? If you want to use EditVertices for MapPoint, you set the CommandParameter to null (not the graphic). While EditVertices is active, any graphic you touch provided it comes from a layer that is included in the Editor, will respond to move or edit geometry. If you are to use DirectlyOver from Map.GestureEventArgs, do you provide a tap_tolerance (double) and specify the layer of interest? (Like the one below) IEnumerable<Graphic> graphics = e.DirectlyOver(TAP_TOLERANCE, new List<GraphicsLayer>() { vertexLayer }); And you say the graphics returned here are incorrect?
... View more
10-27-2010
11:54 AM
|
0
|
0
|
735
|
|
POST
|
I cannot reproduce this with your code but I am using a different hardware. Maybe another process is interfering or causing your WPF App to hang or become sluggish. I know that one of my co-workers notice that our Anti-Virus update checker can do this to any WPF app.
... View more
10-27-2010
11:47 AM
|
0
|
0
|
2204
|
|
POST
|
We don't have a Zoom to scale, but we do have a ZoomToResolution. How you calculate resolution is documented here: http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Map.html
... View more
10-27-2010
11:13 AM
|
0
|
0
|
529
|
|
POST
|
Okay, that makes sense to me now. This feature is not currently supported. Please refer to this related thread: http://forums.arcgis.com/threads/2339-Labelling
... View more
10-27-2010
11:08 AM
|
0
|
0
|
1136
|
|
POST
|
Both MouseLeftButtonDown and MouseLeftButtonUp do not work for that layer? Is there maybe another MouseLeftButtonDown or MouseLeftButtonUp event that is marked Handled somewhere in your code? Could it be because there's no graphic where you clicked?
... View more
10-27-2010
11:04 AM
|
0
|
0
|
1175
|
|
POST
|
Use Silverlight API 🙂 but I would be bias so as Steven mentioned, it really depends on which programming language you are more comfortable using. I know for a fact that if you choose to use the latest SL/WPF API v2.1, it is backwards compatible. Supports ArcGIS 9.3, 10, and 10 SP1.
... View more
10-27-2010
11:01 AM
|
0
|
0
|
1426
|
|
POST
|
Please look at this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsAutoSave CancelActive is the command you use to cancel the current active command. Clicking the "Clear Action" button with Command Binding to Editor's CancelActive is equivalent to this in code-behind: if(editor.CancelActive.CanExecute(null)) editor.CancelActive.Execute(null); where editor is your Editor instance, null is the CommandParameter.
... View more
10-27-2010
10:56 AM
|
0
|
0
|
597
|
|
POST
|
Is your map surrounded by a ScrollViewer? If yes, this thread is related: http://forums.arcgis.com/threads/8575-Pan-Doesn-t-Work!!! The ScrollViewer intercepts Map's MouseEvents.
... View more
10-27-2010
10:37 AM
|
0
|
0
|
1175
|
|
POST
|
Are you using the Map's MapGesture Hold? Moving a MapPoint is supported by EditVertices. You can either move the point using your mouse or using touch. They should behave the same way - for mouse: you press on MouseLeftButtonDown, move the mouse and release to let go; for touch: you touch down on graphic, move your touch to drag the item and touch up to let go. Are you saying the graphic you choose to move does not move, instead another graphic is moved? Or are you simply looking for an event to know which graphic was moved?
... View more
10-27-2010
10:29 AM
|
0
|
0
|
735
|
|
POST
|
You can add any image icon of your choosing - try google images - if you don't find the image you want from the Interactive SDK download.
... View more
10-27-2010
10:04 AM
|
0
|
0
|
411
|
|
POST
|
The first link you shared http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/samples/start.htm#AttributeQuery has a corresponding VB code (see Code Behind VB tab). KBar, MenuIcon, SubButton referenced below were additional cs files in the project. They each had a new namespace ex KBar....which is called in themain xaml file seen below....What kind of NEW ITEM was created to create these when you right click the folder that was added? If KBar, MenuIcon, SubButton belong to different namespaces, then you cannot use a single xaml namespace for them <src:Kbar../>, <src:MenuIcon../>. Instead, you will need separate xaml namespace definition for each like: xmlns:srcKBar="clr-namespace:MyKBarNamespace" xmlns:srcMenuIcon="clr-namespace:MyMenuIconNamespace" Usually though, files belonging to the same project have the same namespace. When folders are added, and you add new item (for example, UserControl) underneath that folder, a new namespace is created with that folder name. It is up to you to keep or edit this new namespace. You just need to know how to access them in xaml and code-behind. While code-behind have Imports/using statements, XAML also have xmlns. I hope this helps somewhat. Try to start with a very simple project first (it does not need to be one of our SDK samples right away) just to get a feel of what goes where and how they come together.
... View more
10-27-2010
09:58 AM
|
0
|
0
|
1890
|
|
POST
|
<esri:Editor x:Key="MyBarriersEditor" LayerIDs="MyBarriersGraphicsLayer" Map="{Binding ElementName=_Map}" /> Is _Map an element of this UserControl? If not, that's the reason the element binding failed. If you want to use this type of binding, your UserControl should have had something like <esri:Map x:Name="_Map" .../> I suggested to make Map a DependencyProperty in your UserControl so that in your MainPage you can do something like: <local:ClosestFacilityControl Map="{Binding ElementName=MyMap}" VerticalAlignment="Top" HorizontalAlignment="Center"/> Your UserControl will need to set Map of each editor a different way. Also, you will not be able to get layers this way (since MyMap does not exist). facilitiesGraphicsLayer = MyMap.Layers["MyFacilitiesGraphicsLayer"] as GraphicsLayer;
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));
private static void OnMapPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
ClosestFacilityControl control = d as ClosestFacilityControl;
Map newMap = e.NewValue as Map;
if(control!=null)
{
Editor editor = control.LayoutRoot.Resources["MyBarriersEditor"] as Editor;
if(editor!=null)
editor.Map = newMap;
editor = control.LayoutRoot.Resources["MyFacilitiesEditor"] as Editor;
if(editor!=null)
editor.Map = newMap;
editor = control.LayoutRoot.Resources["MyIncidentsEditor"] as Editor;
if(editor!=null)
editor.Map = newMap;
control.facilitiesGraphicsLayer = newMap.Layers["MyFacilitiesGraphicsLayer"] as GraphicsLayer;
control.IncidentsGraphicsLayer = newMap.Layers["MyIncidentsGraphicsLayer"] as GraphicsLayer;
control.barriersGraphicsLayer = newMap.Layers["MyBarriersGraphicsLayer"] as GraphicsLayer;
control.routeGraphicsLayer = newMap.Layers["MyRoutesGraphicsLayer"] as GraphicsLayer;
}
}
Also, you need not create a new thread if it's the same issue 😛
... View more
10-27-2010
09:35 AM
|
0
|
0
|
2009
|
|
POST
|
It is actually similar in Expression Blend. You will still need to edit the template and create a style. You then modify the style by drag/drop (if you prefer) or update the xaml. http://msdn.microsoft.com/en-us/library/cc294908(v=Expression.40).aspx
... View more
10-27-2010
08:26 AM
|
0
|
0
|
969
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 09-11-2025 01:30 PM | |
| 1 | 06-06-2025 10:14 AM | |
| 1 | 03-17-2025 09:47 AM | |
| 1 | 07-24-2024 07:32 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|