|
POST
|
Has anyone been able to put together a zoom in and zoom out tool for the silverlight viewer? For example, a user can click on a icon, then draw a box on the map to set the zoom in/out extent. Just wondering if anyone has put these toolsets together. I know we can use the mouse click and shift + left mouse click to zoom in, but many users do not like that functionality and it is hard to use on laptops. I am very interested if somebody has done this. ESRI, are there any suggestions you might have?
... View more
03-07-2013
06:56 AM
|
0
|
8
|
1149
|
|
POST
|
Jamal, it looks like you are getting closer. You will only be able to see one result at a time in ArcGIS desktop, because the data is overwritten in the scratchworkspace each time you run the tool. This works as designed. Now, if you run the script successfully, you should be able to publish a geoprocessing service. I checked your projection system for your data and it looks fine. There shouldn't be any issues there. What I will suggest you do is check your geoprocessing service settings. Specifically look at the Parameters and look for the View Results with a Map Service. Make sure the box is checked. I have this checked and I can see my geoprocessing results for the same tool I built for our organization. After you check your service, re-run the tool in the application builder. When you run the tool, the results will appear in the table of contents, then you can zoom to layer using the out of the box tool. If you run the tool again, another result will appear in the table of contents on top of the other one in the table of contents. This will give your multiple results that you are wanting. I think you are close, because you were able to publish the service. Check your service settings again.
... View more
02-27-2013
03:18 PM
|
0
|
0
|
5501
|
|
POST
|
Jamal, Can you zip up your source data as a shapefile and re-attach? You can eliminate the fields you do not want to show. The .gdb is not working. I will take a look.
... View more
02-26-2013
03:02 PM
|
0
|
0
|
5501
|
|
POST
|
I will also point out that the data in the application is in state plane coordinates (feet), so I had to reproject the intermediate data to WGS 1984 to get the coordinates in decimal degrees. If you are working in WGS 1984, you can eliminate this step. Also the reason there is a buffer is because you cannot zoom to a point in the application builder. . only lines and polygons. The buffer is invisible, so only the point shows up. Seems kind of goofy, but this is how I got it to work.
... View more
02-26-2013
11:45 AM
|
0
|
0
|
5501
|
|
POST
|
Jamal, I had the same issue, but built a python script and use it as a tool in the application builder. The tool will add coordinates to the map. The results will show up in the table of contents and you can use the zoom to layer to zoom in on the coordinates. You can perform multiple searches. Below is the full code for the tool if you are interested. ---------------------------------------------- # Import arcpy module import arcpy, os, sys from arcpy import env # Set Geoprocessing environments scratch = arcpy.env.scratchWorkspace arcpy.env.scratchWorkspace = r"E:\geoprocessing\FindCoordinates\outputworkspace" arcpy.env.overwriteOutput = True # Process: Create Table FindCoordinatesTable = os.path.join(scratch,'FindCoordinates.dbf') arcpy.CreateTable_management(scratch, "FindCoordinates.dbf", "", "") arcpy.AddField_management(FindCoordinatesTable, "X", "DOUBLE", "", "", "", "", "NULLABLE", "NON_REQUIRED", "") arcpy.AddField_management(FindCoordinatesTable, "Y", "DOUBLE", "", "", "", "", "NULLABLE", "NON_REQUIRED", "") # Coordinate Input Parameters XCoordinate = arcpy.GetParameterAsText(0) YCoordinate = arcpy.GetParameterAsText(1) # Create Insert Cursor and a New Empty Row rowInserter = arcpy.InsertCursor(FindCoordinatesTable) NewRecord = rowInserter.newRow() # Populate Attributes of New Row NewRecord.X = XCoordinate NewRecord.Y = YCoordinate # Insert New Row Into Table rowInserter.insertRow(NewRecord) # Local variables: FindCoordinatesLayer = "FindCoordinatesLayer" FeatureToPointSHP = os.path.join(scratch,'FeatureToPoint.shp') FindCoordinateSHP = os.path.join(scratch,'FindCoordinate.shp') FindCoordinatesBuffer = os.path.join(scratch,'FindCoordinatesBuffer.shp') # Process: Make XY Event Layer arcpy.MakeXYEventLayer_management(FindCoordinatesTable, "x", "y", FindCoordinatesLayer, "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433],METADATA['World',-180.0,-90.0,180.0,90.0,0.0,0.0174532925199433,0.0,1262]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119522E-09;0.001;0.001;IsHighPrecision", "") # Process: Feature To Point arcpy.FeatureToPoint_management(FindCoordinatesLayer, FeatureToPointSHP, "CENTROID") # Process: Project arcpy.Project_management(FeatureToPointSHP, FindCoordinateSHP, "PROJCS['NAD_1983_StatePlane_Oklahoma_North_FIPS_3501_Feet',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['False_Easting',1968500.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-98.0],PARAMETER['Standard_Parallel_1',35.56666666666667],PARAMETER['Standard_Parallel_2',36.76666666666667],PARAMETER['Latitude_Of_Origin',35.0],UNIT['Foot_US',0.3048006096012192]]", "WGS_1984_(ITRF00)_To_NAD_1983", "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433],METADATA['World',-180.0,-90.0,180.0,90.0,0.0,0.0174532925199433,0.0,1262]]") # Coordinate Buffer arcpy.Buffer_analysis(FindCoordinateSHP, FindCoordinatesBuffer, "75 Feet", "FULL", "ROUND", "NONE", "") arcpy.AddMessage("Coordinates mapped.") # Output Parameters arcpy.SetParameterAsText(2,FindCoordinateSHP) arcpy.SetParameterAsText(3,FindCoordinatesBuffer) ---------------------------------- Set tool Parameters: Find X Coordinate (Long) Double Find Y Coordinate (Lat) Double Coordinate Output Shapefie Type: Derived; Direction: Output; Environment: ScratchWorkspace; Symbology (specify layer file) Coordinate Output Buffer Shapefie Type: Derived; Direction: Output; Environment: ScratchWorkspace; Symbology (specify layer file) ----------------------------------- What it looks like in the application Builder:
... View more
02-26-2013
11:37 AM
|
0
|
0
|
5501
|
|
POST
|
Has anyone been able to create a identify tool that handles related objects in Javascript? Are there are any samples? This is something I want to achieve. I can set up a basic identify, but do not have it set up to handle related objects. There are cases where we have related objects that contain related objects. An example is: Feature Class: Traffic Pole Related Object: MastArm (related to Traffic Pole) Related Object: Signal Head (related to Mast Arm) Would love to hear some feedback.
... View more
02-22-2013
06:18 AM
|
0
|
0
|
811
|
|
POST
|
Hi Ian, Yes, we've seen this issue before and it is caused by having a record with a field with no value. The workaround is to ensure each field has a value/data. See this previous post: http://forums.arcgis.com/threads/54576-CSV-Export-Issue Hope that helps, Katy Any idea on when this issue will be fixed? For our data, we cannot guarantee there will never be null values.
... View more
02-20-2013
06:58 AM
|
0
|
0
|
952
|
|
POST
|
The problem still exists in the Application Builder version 3.1. Any fixes for the future?
... View more
02-08-2013
10:26 AM
|
0
|
0
|
952
|
|
POST
|
I just upgraded to ArcGIS Silverlight API 3.0 to 3.1 and the ArcGIS Silverlight Viewer from 3.0 to 3.1. When trying to upgrade my applications, I am getting the following error message: Anyone have any suggestions how to resolve this error? I created a new application and copied code in from my 3.0 version application, but I could not utilize the functionality of the query related objects tool. Looks like I have to create the application over again?
... View more
01-31-2013
12:51 PM
|
0
|
1
|
1649
|
|
POST
|
This looks pretty cool. I was able to build a .xap in visual studio. However, when adding it to the viewer. I specified a feature layer so I can select attributes. On the query form, no fields are showing up from the drop down list. All of the fields are visible. I am using this service as a test: http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/MapServer/0 Also, here is a screenshot of what I am seeing. If the fields are visible and I am using a feature layer, I should be able to see the fields from the drop down list. . correct? Let me know what I am doing wrong. Also getting an error message when adding in the Points of Interest feature layer. Any ideas?
... View more
01-23-2013
05:25 PM
|
0
|
0
|
936
|
|
POST
|
I have an editable feature layer within a application, but it is not labeling. Is there way to label these features? If I add in the map service, the labels appear. There seems to be a few bugs with this Silverlight 3.0 Builder. . the .csv export cannot handle null values and feature layers are not editing.
... View more
12-14-2012
11:36 AM
|
0
|
1
|
459
|
|
POST
|
I have seen this sample. This is tied to the pop-up. .is that correct? Instead of the pop-up, I would rather see a identify tool where we can click on a plus sign to drill down to the related objects and something that is configurable.
... View more
12-06-2012
07:05 AM
|
0
|
0
|
399
|
|
POST
|
I have configured a number of custom print templates for each web application. When printing a map as a .pdf, all of the labels look blurry and some of the lines look jagged. It is almost if the print quality is defaulted to 75 or 96 dpi. Is there a way to improve print quality within the add-in code? I have tested a number of fonts and have printed to 5 printers and print quality looks the same.
... View more
12-06-2012
05:25 AM
|
0
|
1
|
1008
|
|
POST
|
Is ESRI planning to release a identify tool that is capable of allowing the end user to identify related objects? In our organization, we have around 60 or so related objects and want to be able to identify them within the application. ArcGIS Users in our organization like functionality the identify tool that was in the old web adf more than the pop-ups tool.
... View more
12-06-2012
05:21 AM
|
0
|
3
|
745
|
|
POST
|
I made my own if this is to any help. Not the prettiest code and not sure how effective it is with large amounts of data, but it works for my purposes. private void GetAttributesFromSelected()
{
GraphicsLayer selectedLayer = MapApplication.Current.SelectedLayer as GraphicsLayer;
IEnumerable<Graphic> selectedGraphics = selectedLayer.SelectedGraphics;
int numberOfRows = selectedGraphics.Count();
if (numberOfRows > 0)
{
string[] columnNames = GetColumnNames(selectedGraphics.First());
string[] attributeArray;
List<string[]> dataList = new List<string[]>();
int attributeCounter = 0;
foreach (Graphic g in selectedGraphics) // Iterates through chosen objects
{
attributeArray = new string[25];
ICollection<object> valueCollection = g.Attributes.Values;
foreach (object obj in valueCollection) // Iterates through attribute values
{
if (obj != null)
attributeArray[attributeCounter] = obj.ToString();
attributeCounter++;
}
attributeCounter = 0;
dataList.Add(attributeArray);
}
WriteToCSV(columnNames, dataList);
}
else
MessageBox.Show("No rows exported.");
}
// Gets column names
private string[] GetColumnNames(Graphic graphic)
{
string[] columnNames = new string[graphic.Attributes.Keys.Count];
int columnIndex = 0;
foreach (string s in graphic.Attributes.Keys)
{
columnNames[columnIndex] = s.ToString();
columnIndex++;
}
return columnNames;
}
// Creates the CSV
private void WriteToCSV(string[] columnNames, List<string[]> dataList)
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "CSV File|*.csv";
if (sfd.ShowDialog() == true)
{
using (Stream stream = sfd.OpenFile())
{
StreamWriter sw = new StreamWriter(stream, System.Text.Encoding.UTF8);
foreach (string s in columnNames)
sw.Write(s + ","); //Skriver ut alla kolumnnamn
sw.WriteLine();
foreach (string[] strArr in dataList) // Itererar igenom listans arrayer
{
foreach (string str in strArr) // Itererar igenom arrayens strängar
{
sw.Write(str + ",");
}
sw.WriteLine();
}
sw.Close();
stream.Close();
}
}
}
public bool CanExecute(object parameter)
{
return MapApplication.Current.SelectedLayer != null && MapApplication.Current.SelectedLayer is GraphicsLayer &&
(MapApplication.Current.SelectedLayer as GraphicsLayer).SelectedGraphics.Count() > 0;
} Did you create this as a add-in? If so, I would be interested in trying this out. Basically, I want to select features in the web application, then export the selected records as a .csv or .dbf.
... View more
11-27-2012
01:07 AM
|
0
|
0
|
952
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-01-2022 05:53 AM | |
| 1 | 09-18-2018 06:17 AM | |
| 1 | 06-19-2018 10:31 AM | |
| 1 | 05-15-2018 10:42 AM | |
| 1 | 10-14-2015 03:59 PM |
| Online Status |
Offline
|
| Date Last Visited |
06-10-2025
07:13 AM
|