POST
|
There is directory of png files that you can use in c:\program files\arcgis\DeveloperKit10.0\icons I use these and change them with photoshop or gimp. Chris
... View more
10-07-2011
01:09 PM
|
0
|
0
|
466
|
POST
|
Hey, I am using the make feature layer command with a user defined feature class and field. The where statement is created with the field and value that the user defines. The problem is that the field is sometimes a number and sometimes a text value. So the quotes (or lack of them) in the where statement will crash the make feature layer command. I tried to use the cast or convert commands to convert the field to a string field so the where command will always have the same type of quotes. I am not able to get the convert or cast to work. Here are some samples of what I tried:
//string whereClause = "Cast(\"" + fieldname + "\" AS varchar) = '" + fieldval + "'";
//string whereClause = "\"Cast(" + fieldname + " AS varchar)\" = '" + fieldval + "'";
//string whereClause = "\"" + fieldname + "\" = '" + fieldval + "'";
//string whereClause = "\"Convert(varchar(500), '" + fieldname + "')\" = '" + fieldval + "'";
//string whereClause = "\"Convert(varchar, '" + fieldname + "')\" = '" + fieldval + "'";
//string whereClause = "Convert(varchar, \"" + fieldname + "\") = '" + fieldval + "'";
string whereClause = "Convert(varchar, " + fieldname + ") = '" + fieldval + "'"; Does anybody know how to use the convert or cast command, or a better way to accomplish this? Thanks, Chris
... View more
09-09-2011
12:37 PM
|
0
|
2
|
862
|
POST
|
Barbara, Thanks for the suggestion. I was looking at the feature layer for the targetFC. When I made the actual targetFC the parameter, it saved through the remainder of the model. Chris
... View more
09-09-2011
06:15 AM
|
0
|
0
|
655
|
POST
|
Hey, I have a model that uses in_memory feature classes as intermediate data sets. The final process is an append command. It all works, but the final feature class is only in memory, and I cannot figure out how to get it into a saved feature class. Any ideas? Thanks, Chris
... View more
09-07-2011
02:29 PM
|
0
|
3
|
1034
|
POST
|
Jennifer, It was one of those funky network things. The permissions in the arcgiscache folder somehow changed, and the SOC and SOM no longer had premissions to that folder. We changed the permissions and it worked again. Chris
... View more
08-24-2011
02:40 PM
|
0
|
0
|
263
|
POST
|
Hey, We have a single fused map cache with 13 levels. It all looks fine when you look at the rest end point, but the LOD's do not show up in the map app. The map displays correctly, but will zoom in farther than the LOD's will normally allow it to -- not honoring the cache levels. We restarted the service, and cleared the rest cache. It worked correctly until today. Any ideas on how to fix it? Thanks, Chris
... View more
08-24-2011
09:33 AM
|
0
|
2
|
520
|
POST
|
Hey, Is is possible to upload a gps track to an editable feature layer? Thanks, Chris
... View more
08-24-2011
09:27 AM
|
1
|
1
|
889
|
POST
|
I used a timer and had it check the mouse move every 5 seconds. Not perfect, but it keeps the lat long display from cycling after the mouse has stopped moving. Here is the code: #region Mouse Coordinates on screen
//get the coordinates to show on the menu bar
System.Windows.Threading.DispatcherTimer mouseTimer = new System.Windows.Threading.DispatcherTimer();
ESRI.ArcGIS.Client.Geometry.MapPoint mapPoint; //initiate a map point to get the screen map point
private void ArcGISTiledMapServiceLayer_Initialized(object sender, EventArgs e)
{
//Start the timer
mouseTimer.Interval = new TimeSpan(0, 0, 0, 0, 500); // 500 Milliseconds = 1/2 second
mouseTimer.Tick += new EventHandler(mouseTimer_Tick);
mouseTimer.Start();
Map.MouseMove += new System.Windows.Input.MouseEventHandler(MyMap_MouseMove);
}
void mouseTimer_Tick(object sender, EventArgs e)
{
double mouseX;
double mouseY;
if (mapPoint != null)
{
Graphic mouseGraphic = new Graphic();
mouseX = mapPoint.X;
mouseY = mapPoint.Y;
mouseGraphic.Geometry = mapPoint;
GeometryService latlonService = new GeometryService("http://<server>/ArcGIS/rest/services/Geometry/GeometryServer");
latlonService.ProjectCompleted += new EventHandler<GraphicsEventArgs>(latlonService_ProjectCompleted);
latlonService.Failed += new EventHandler<TaskFailedEventArgs>(latlonService_Failed);
SpatialReference sr = new SpatialReference();
sr.WKID = 4326;
IList<Graphic> inG = new List<Graphic>();
inG.Add(mouseGraphic);
latlonService.ProjectAsync(inG, sr);
}
}
private void MyMap_MouseMove(object sender, System.Windows.Input.MouseEventArgs args)
{
if (Map.Extent != null)
{
Graphic mouseGraphic = new Graphic();
System.Windows.Point screenPoint = args.GetPosition(Map);
mapPoint = Map.ScreenToMap(screenPoint);
}
}
void latlonService_Failed(object sender, TaskFailedEventArgs e)
{
MessageBox.Show(e.Error.Message + "Latitude Longitude Service Failed");
}
void latlonService_ProjectCompleted(object sender, GraphicsEventArgs e)
{
IList<Graphic> results = e.Results;
string mouseCoords = "Latitude: " + Utilities.DDtoDMS(results[0].Geometry.Extent.YMax, false);
mouseCoords += ", Longitude: " + Utilities.DDtoDMS(results[0].Geometry.Extent.XMax, false);
LatLongText.Text = mouseCoords;
}
#endregion
... View more
08-01-2011
03:11 PM
|
0
|
0
|
307
|
POST
|
Rahul, Where do you put that code? I tried putting it in a text editor web part, but it did not work. Chris
... View more
07-07-2011
10:55 AM
|
0
|
0
|
625
|
POST
|
Hey, I am loading a dynamic lightning data service in Sharepoint, but it does not seem dynamic. When the map is loaded, the lightning data is from the previous day until you refresh the map service. If you refresh the entire page, it will revert to the cached service. It will also refresh when you zoom or pan. This can be very confusing to the users, who expect to see the latest data when they open the map page. Does anybody know if there is something like the html no-cache statement for sharepoint? Thanks, Chris
... View more
07-07-2011
09:37 AM
|
0
|
2
|
955
|
POST
|
Hey, Does anybody know if you can remove the esri logo at the bottom right corner of the map? Thanks, Chris
... View more
07-06-2011
02:37 PM
|
0
|
4
|
3220
|
POST
|
You can remove the fields that you don't want in the service itself. Just go to the properties of each feature class in the service, go to the fields tab and uncheck the fields that you do not need.
... View more
07-06-2011
10:26 AM
|
0
|
0
|
376
|
POST
|
Jennifer, I uncovered the problem. I was using code to create a toggle button, making a button into a tool, and that was causing the conflict with the editing attribute window. I changed the behavior from the button keeping the draw surface enabled to the having the draw surface enabled while the dockable window is open. The code that caused the conflict is: #region toggle group
public static string GetToggleGroup(DependencyObject obj)
{
return (string)obj.GetValue(ToggleGroupProperty);
}
public static void SetToggleGroup(DependencyObject obj, string value)
{
obj.SetValue(ToggleGroupProperty, value);
}
// Using a DependencyProperty as the backing store for ToggleGroup. This enables animation, styling, binding, etc...
public static readonly DependencyProperty ToggleGroupProperty =
DependencyProperty.RegisterAttached("ToggleGroup", typeof(string), typeof(Utilities), new PropertyMetadata(null, OnToggleGroupPropertyChanged));
private static void OnToggleGroupPropertyChanged(DependencyObject dp, DependencyPropertyChangedEventArgs args)
{
if (!(dp is ToggleButton))
throw new ArgumentException("Toggle Group can only be set on ToggleButton");
ToggleButton button = dp as ToggleButton;
string newID = (string)args.NewValue;
string oldID = (string)args.OldValue;
if (oldID != null && groups.ContainsKey(oldID))
{
groups[newID].Remove(button);
button.Checked -= button_Checked;
}
if (newID != null)
{
if (!groups.ContainsKey(newID))
{
groups.Add(newID, new List<ToggleButton>());
}
groups[newID].Add(button);
button.Checked += button_Checked;
}
}
private static void button_Checked(object sender, RoutedEventArgs e)
{
ToggleButton button = sender as ToggleButton;
string ID = GetToggleGroup(button);
if (ID != null && groups.ContainsKey(ID))
{
foreach (ToggleButton b in groups[ID])
{
if (b != button)
b.IsChecked = false;
}
}
}
private static Dictionary<string, List<ToggleButton>> groups = new Dictionary<string, List<ToggleButton>>();
#endregion
Thanks, Chris
... View more
05-26-2011
07:54 AM
|
0
|
0
|
609
|
POST
|
Jennifer, I started over with a clean template and am trying to reproduce the problems, and I can't. I am going to put all the tools in one at a time and try to figure out where the problem starts. If I figure it out, I will post it to this. Thanks, Chris
... View more
05-24-2011
08:31 AM
|
0
|
0
|
609
|
Title | Kudos | Posted |
---|---|---|
1 | 02-23-2012 01:10 PM | |
1 | 08-24-2011 09:27 AM | |
2 | 11-10-2014 10:02 AM | |
6 | 08-03-2012 10:39 AM | |
5 | 08-03-2012 10:39 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|