POST
|
I switched the coordinate system of the MXD to WGS 1984 Web Mercator (Auxiliary Sphere). I then re-added the Extract Data Task and published the Geoprocessing service using the new MXD. The Geoprocessing service is still not working.
... View more
08-21-2013
05:14 AM
|
0
|
0
|
346
|
POST
|
You are using different CRS in ArcMap and a different CRS in your Javascript same application. You can try changing the data frame properties in your ArcMap to use the same (Web mercator i.e. 102100) In my javascript app I am also doing a FeatureLayer.selectFeatures and setting the query's geometry to a polygon drawn using the same tool I use to draw the polygon that is sent to the geoprocessing service. The selectFeatures works even though the coordinate system in ArcMap is different than the javascript app. Why does it work for the query but not the geoprocessing service? Are the "Output Spatial Reference" and "Process Spatial Reference" environment options (for the geoprocessing service) supposed to fix my coordinate system issue?
... View more
08-20-2013
05:07 AM
|
0
|
0
|
346
|
POST
|
Any chance you can post some sample coordinates from ArcMap (plus the data frame's coordinate system) and what you get in the Javascript app? My guess is either a feet vs meters issue and you're using state plane, or more likely, the web app is ending up in "web Mercator" aka EPSG:3857 / Esri:102100. Melita Here is the coordinate system information from ArcMap: Pennsylvania Polyconic Projection: Polyconic Central_Meridian: -77.750000 Latitude_Of_Origin: 40.925000 Linear Unit: Meter NAD 83 Datum: NAD 83 Here is the polygon information. From ArcMap: [[102893.542, -40718.736], [184385.372, -117977.224], [26693.39, -106864.701], [102893.542, -40718.736]] From Javascript: [[-8519849.423608808, 4946710.14057987], [-8415589.317027876, 4843061.530225221], [-8621357.797171494, 4861406.417013655], [-8519849.423608808, 4946710.14057987]] The map's spatial reference in the javascript app is wkid 102100.
... View more
08-19-2013
01:16 PM
|
0
|
0
|
346
|
POST
|
What is the spatial reference you are using? What data are you referencing in your clip and ship? The spatial reference in the .mxd is NAD 83. Pennsylvania polyconic with Datum NAD 83. I am not sure if I understood your question completely on the "drawing a similar polygon on my map using the javascript API". I have a web page that displays a map using the ESRI Javascript API. When I draw a polygon on the map, the rings have large coordinates. Ex: [-8549506.990583437, 4958634.316992373] When I draw a similar polygon in ArcMap, the coordinates are much smaller. Ex: [52989.647, -15185.816]
... View more
08-19-2013
12:43 PM
|
0
|
0
|
346
|
POST
|
Hello, I have a geoprocessing service that can do an Extract Data Task based off the "Clip and Ship" example. It works when run inside ArcMap, however, when running it from the service "Submit Job" web page, no features are returned unless the "Area of Interest" input field is entered using coordinates in meters (I got these coordinates from ArcMap). When drawing a similar polygon on my map using the javascript API, the coordinates for the polygon are much larger and I'm not sure what unit they are in. How do I convert them to meters to send to the geoprocessing service? Thanks!
... View more
08-19-2013
09:29 AM
|
0
|
7
|
579
|
POST
|
You said you're consuming via REST? Have you set the spatial reference in your input AOI request? Does it match the original features? Are you referring to the Output Spatial Reference and Process Spatial Reference text boxes? I've tried leaving them blank and setting them to 102100 and neither work. I was playing around with the Area of Interest and when using meters for the polygon rings, it worked and returned features. However, when drawing a polygon on the map, it always uses coordinates that are huge. [[[52989.647, -15185.816], [153531.515, -119961.026], [33410.442, -125252.703], [52989.647, -15185.816]]] - This is in meters and works. I got these values from ArcMap which is using a NAD 83 coordinate system. [[[-8584973.771707749, 5056473.713197373], [-8425984.752874626, 4859571.928334812], [-8655907.333956374, 4830220.109473312], [-8584973.771707749, 5056473.713197373]]] - Someone told me these are projected coordinates. This is what I get when I draw the polygon on the map. How do I convert this into the meter coordinates?
... View more
08-13-2013
07:31 AM
|
0
|
0
|
241
|
POST
|
Hello, I created a geoprocessing service by following the Clip and Ship example. When I run the Extract Data Task from within ArcMap, I get a coordinate system warning but the resulting shapefiles contain the correct features. However, when I try and run the Extract Data Task from the REST web interface, I get the coordinate system warning but no features are in the result shapefile. The shapefile does contain the correct fields though. Does anyone know what the cause of this issue might be? Is this a spatial reference issue? Thanks, Rob
... View more
08-12-2013
11:57 AM
|
0
|
2
|
566
|
POST
|
I ran a quick test and selecting features using a where clause worked for me. Here's a jsFiddle showing the code: http://jsfiddle.net/7ukqS/ I used the feature layer URL from your example and my code worked. There must be something wrong with my service when using a where clause. I'll have to check with the person who made the service to make sure it is returning the correct data. It always returns the correct features, but there might be something subtly wrong with the geometry. Thanks!
... View more
07-26-2013
08:48 AM
|
0
|
0
|
559
|
POST
|
Try adding a an errback function to see if something is up. This will not only show errors from the server, but will also expose processing errors in the callback function which will otherwise not be logged in the console. Thanks for the suggestion. I added an error callback function but it never gets called.
... View more
07-26-2013
06:05 AM
|
0
|
0
|
559
|
POST
|
Hello, I am trying to select features from a feature layer using a query with a where clause. It returns the correct features, but does not draw them. When I do the same thing but use a query with the geometry property set to a polygon, the correct features are returned AND drawn on the map. How do I get this to draw the feature layer when using a where clause with the query? Here is my code:
var featureLayer = new esri.layers.FeatureLayer(arcGisServerUrl + "/" + serviceLayerId, {
mode: esri.layers.FeatureLayer.MODE_SELECTION,
outFields: ["*"],
id: featureLayerName
});
var query = new esri.tasks.Query();
query.outFields = ["*"];
query.returnGeometry = true;
query.where = "1=1";
featureLayer.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW, HandleRouteSelectFeaturesResults);
Thanks! Rob
... View more
07-25-2013
10:16 AM
|
0
|
5
|
4950
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|