|
POST
|
Thanks Heming. But still no result shows after changing. I am wondering where the result markers come from for ESRI geocoder. Do I need to create marker for my geocoder? please see the source code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html debug=true> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Using Geocoding Service</title> <script src="http://maps.google.com/maps?file=api&v=2&key=DioG219lPJG3WTn3zmQqebsjVg" type="text/javascript"></script> <script src="http://serverapi.arcgisonline.com/jsapi/gmaps/?v=1.6" type="text/javascript" ></script> <script type="text/javascript"> var gmap = null; var locator = null; var mapExtension = null; var gOverlays = null; function initialize() { gmap = new GMap2(document.getElementById('gmap')); gmap.addMapType(G_NORMAL_MAP); gmap.addMapType(G_SATELLITE_MAP); gmap.addControl(new GLargeMapControl()); gmap.addControl(new GMapTypeControl()); gmap.setCenter(new GLatLng(29.76, -95.36),12); // Redlands (Point) mapExtension = new esri.arcgis.gmaps.MapExtension(gmap); locator = new esri.arcgis.gmaps.Locator("http://gisapps.houstongims.org/ArcGIS/rest/services/Address_Locator_Zip_Appr_HCAD_Parcel2009/GeocodeServer"); } function findAddress() { mapExtension.removeFromMap(gOverlays); var address = new Object(); address.Street="611 Walker"; address.Zone= "77002"; var outFields = ["Street"]; locator.addressToLocations(address, outFields, false, mycallback); } function mycallback(addressResults) { gOverlays = mapExtension.addToMap(addressResults); } </script> </head> <body onload="initialize();" onunload="GUnload();"> <table width="100%" height="100%"> <tr> <td align="center"> <table> <tr align="left"> <td> <input type="button" value="Find Address" onclick="findAddress();" /> <input type="button" value="Clear Map Overlays" onclick="mapExtension.removeFromMap(gOverlays);" /> </td> </tr> <tr align="left" valign="top"> <td> <div id="gmap" style="width: 500px; height:500px;"></div> </td> </tr> </table> </td> </tr> </table> </body> </html> You can get the geocoded point by using addressResults.addressCandidates[0].location.getLatLng(); and then signed the marker and add to the map.. Here is part of my code, hope it will help: { ...... var locator = new esri.arcgis.gmaps.Locator(duvalGoogleApp.locatorDirectory); var address =new Object(); address.Street =fmAddress; locator.addressToLocations(address, null, false, getToAddress); } function getToAddress(addressResults) { if (addressResults.addressCandidates.length>0) { duvalGoogleApp.fPoint =addressResults.addressCandidates[0].location.getLatLng(); ....... } else { duvalGoogleApp.Desc.innerHTML="Can not find the From address !"; return; } }
... View more
04-19-2011
12:19 PM
|
0
|
0
|
762
|
|
POST
|
I modified geocoding sample page http://help.arcgis.com/EN/webapi/javascript/gmaps/samples/locator/locator_address.html using my locator (it is a working locator using by other applications) by changed 3 line of code like below, and no result show. Please help! : gmap.setCenter(new GLatLng(29.7598967, -95.3670557), 12); ........ locator = new esri.arcgis.gmaps.Locator("http://gisapps.houstongims.org/ArcGIS/rest/services/Address_Locator_Zip_Appr_HCAD_Parcel2009/GeocodeServer"); .......... var address = { Street:"611 Walker st", Zone:"77002" }; Use Javascript Object instead of JavaScript Object Notation. var address =new Object(); address.Street ="611 Walker st"; address.Zone ="77002"; locator.addressToLocations(address, callback); .....
... View more
04-19-2011
10:21 AM
|
0
|
0
|
762
|
|
POST
|
Thank you for the help! However, I'm still having problems integrating it into the appropriate function. I tried doing this, but it doesn't seem to have any effect: function buildLayerList(layer) {
var items = dojo.map(layer.layerInfos,function(info,index){
if (layer.parentLayerId == -1) {
visible.push(info.id);
}
return "<input type='checkbox' class='list_item' checked='" + (info.defaultVisibility ? "checked" : "") + "' id='" + info.id + "' onclick='updateLayerVisibility();' /><label for='" + info.id + "'>" + info.name + "</label>";
});
dojo.byId("layer_list").innerHTML = items.join();
layer.setVisibleLayers(visible);
map.addLayer(layer);
} The idea was to insert a condition where it only creates checkboxes for the group parents, but I'm obviously missing something. Thanks again for help! EDIT: To clarify: I want to toggle the visibility of a group of layers with the help of a checkbox that refers to the parent in the group. I want to prevent the script from generating checkboxes for the children, but I still want to show the children in the map when their parent is checked. You can't fetch layerInfos until after layer properties for the layer are successfully populated. You can fire layer's onLoad event to get and set the layer's visibility.. try this: function buildLayerList(layer) { dojo.connect(layer, "onLoad", function(){ var items = dojo.map(layer.layerInfos,function(info,index){ if (layer.parentLayerId == -1) { visible.push(info.id); } return "<input type='checkbox' class='list_item' checked='" + (info.defaultVisibility ? "checked" : "") + "' id='" + info.id + "' onclick='updateLayerVisibility();' /><label for='" + info.id + "'>" + info.name + "</label>"; }); });
... View more
04-19-2011
09:44 AM
|
0
|
0
|
760
|
|
POST
|
Hi, I've used the ESRI sample for dynamically building checkbox toggles for layer visibility. However, as the layers in my map service occur several times albeit in different scales, the list layers function shows both the name of the parent group layer as well as the names of the children. Like so: -Checkbox- Roads -Checkbox- Roads 500 -Checkbox- Roads 1000 -Checkbox- Roads 1500 Thusly, I need a way to exclude the children from the list (Roads 500, 1000, 1500) while still having the Roads group checkbox hiding or showing all of its children. Is there some variable that I can check in the buildlayerlist function that filters out the layers I want to exclude? How would the code look? Any help is very appreciated! Thank you you can identify a sublayer by using layer property: parentLayerId. here is the code sample show how: var infos = myMapLayer.layerInfos; //set the selected layer visible for (var i = 0; i < infos.length; i++) { if (infos.parentLayerId !=-1){ // a sublayer if (infos.name ==your sublayer name) viewService.setVisibleLayers(); { }
... View more
04-18-2011
06:03 AM
|
0
|
0
|
760
|
|
POST
|
Hi.. Thanks for the info about the geoprocessor. Indeed, I can now see (and retrieve) the generated PDF when using the geoprocessing task through the services interface. To test parameter input, I have written the exact values to the console (see code below), then copied and pasted them into the services interface - this is where I get a "esriJobSucceeded" status back. var params = {
"xMin": map.extent.xmin,
"yMin": map.extent.ymin,
"xMax": map.extent.xmax,
"yMax": map.extent.ymax,
"Spatial_Reference": map.spatialReference.wkid,
"Map_Scale": esri.geometry.getScale(map),
"Visiblelayers": dojo.toJson(visiblelayers),
"Layout": dijit.byId("mapLayout").value,
"Include_Attributes": dijit.byId("incAttribs").checked,
"Map_Title": dijit.byId("mapTitle").value,
"PointGraphics": getFeatureSet("point"), // optional
"LineGraphics": getFeatureSet("polyline"), // optional
"PolyGraphics": getFeatureSet("polygon") // optional
};
console.log("PDF PARAMETERS");
console.log(map.extent.xmin);
console.log(map.extent.ymin);
console.log(map.extent.xmax);
console.log(map.extent.ymax);
console.log(map.spatialReference.wkid);
console.log(esri.geometry.getScale(map));
console.log(dojo.toJson(visiblelayers));
console.log(dijit.byId("mapLayout").value);
console.log(dijit.byId("incAttribs").checked);
console.log(dijit.byId("mapTitle").value);
console.log(getFeatureSet("point"));
console.log(getFeatureSet("polyline"));
console.log(getFeatureSet("polygon")); I do use the getResultData function, but before that even fires, I check the status using the statusCallback as follows: function pdfStatusCallback(jobInfo) {
console.log(jobInfo.jobStatus);
if (jobInfo.jobStatus === "esriJobFailed") {
pdfErrorCallback();
}
} That console statement is never fired. So basically, the task is not even being sent to the service as expected (which would hint at a parameter issue like you say), but I cant see how since I am successfully using the same parameters using the services interface.. Still stumped! Richard. Look at your GP service through Service directory. It should list all the parameters. Use it as a guide to define your parameters. I have a code sample listed at this thread: http://forums.arcgis.com/threads/27763-Problem-with-Geoprocessing-Service.
... View more
04-15-2011
04:46 AM
|
0
|
0
|
1223
|
|
POST
|
I am trying to limit the results returned by the IdentifyTask by setting the IdentifyParameters.layerDefinitions. However it seems to ignore this and rather continues to return all found features from the ArcGISDynamicMapService. For instance if set...
identifyParams.layerDefinitions[0] = "prod_gas = 'Yes'";
and then execute the IdentifyTask. The petroleum field polygon features where prod_gas = 'No' are still returned in the results set. Here's a link to an esri sample server (v10) rest services directory that demonstrates this... http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Petroleum/KSFields/MapServer/identify?geometryType=esriGeometryPoint&geometry=-96%2C38&sr=4267&layers=0&time=&layerTimeOptions=&layerdefs=prod_gas%3D%27Yes%27&tolerance=2&mapExtent=-101.980837490204%2C34%2C-93%2C43&imageDisplay=400%2C400%2C96&returnGeometry=false&maxAllowableOffset=&f=HTML Am I not setting the .layerDefinitions correctly or is this a bug? thanks, jason put {"0": "prod_gas = 'Yes'"} in http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Petroleum/KSFields/MapServer//0 should work. Same way put identifyParams.layerDefinitions = {"0": "prod_gas = 'Yes'"}; should do the trick.
... View more
04-14-2011
01:09 PM
|
0
|
0
|
604
|
|
POST
|
Should I do this kind of query against a feature layer, or is it simply not feasible with a large dataset? A feature layer sounds like a good candidate. Narrow down your query.where clause or add a spatial filter to your query might be another option...
... View more
04-14-2011
12:37 PM
|
0
|
0
|
1481
|
|
POST
|
Hi there, I have setup a geoprocessing task (a python script) that generates a PDF based on a map document "template". The script takes a number of arguments, including map extent, SR, visible layers, etc. (the script is actually the "Export PDF web application and GP service sample" from David Spriggs). When I run this from ArcCatalog (as a tool) and enter some values, the tool runs and the PDF is created at my specified location on the local disk. However, when I access and run this very same task from my JSPAI application, it simply returns the error: "Error Submitting Job" (the error stack just points to the JSAPI - using v2.2). I have setup a proxy and this seems to work fine (I get a 200 status) when submitting the task. The parameters are definitely correct, as I have written them to the console, then copied and pasted them in the tool dialog (via ArcCatalog) and the tool runs fine. To test further, I used the SubmitJob page through the rest service directory. Again, I entered all the values and the results come back saying the task is complete. However, the PDF created is not located in the directory specified in the python script, but at some non-existent location (http://<server>/arcgisjobs/exportpdf_gpserver/j07d98f158f774503be941bcccedce974/scratch/Map_test6.pdf). So, is it that the GP task ignores the file paths of the original script and uses a setting of its own to save the new file? If so, where is that setting? Or is that just a temp path used by the rest service interface? Or am I totally confused? Any help or suggestions welcome. Thanks, Richard. P.S. It also might be worth noting that the GP error I get comes back very fast. When the tool runs successfully from arccatalog it can take up to a minute. So I am assuming the problem is "early" in the task (i.e. connection, variables, etc.) rather than in the task itself. Any GP outputs run through ArcGIS server will be put in ArcGIS server's Jobs Directory whether you specify or not in your python script. It take the following format: http://<server>/Jobs directory/subFolder (your GP is located) if any/GP service name /JobID/your output. So the location you mentioned http://<server>/arcgisjobs/exportpdf_gpserver/j07d98f158f774503be941bcccedce974/scratch/Map_test6.pdf. actually did exist. And that is a good thing. It means that your gp actually worked. You can get your PDF by using GP getResultData(jobId, parameterName, callback?, errback?) method. Mostly likely your failure is due to you do not set your parameters correctly in your code.
... View more
04-14-2011
06:07 AM
|
0
|
0
|
1223
|
|
POST
|
Hi: I'm trying to adapt the example at http://help.arcgis.com/en/webapi/javascript/arcgis/demos/query/query_hover.html However, I am not able to make it work. I've looked at the sample code and some other examples, and I can't see where I went wrong. Any help would be appreciated. Here's my code. _____________________________________________ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="X-UA-Compatible" content="IE=7" /> <title>Title</title> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/1.5/js/dojo/dijit/themes/tundra/tundra.css"> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=1.6"></script> <script type="text/javascript" language="Javascript"> dojo.require("esri.map"); dojo.require("esri.tasks.query"); var map; function init() { var startExtent = new esri.geometry.Extent(-83.41, 31.98, -78.47, 35.28, new esri.SpatialReference({wkid:4326})); map = new esri.Map("map",{extent:startExtent}); dojo.connect(map,"onLoad", initFunctionality); map.addLayer(new esri.layers.ArcGISDynamicMapServiceLayer("http://dingo.gapanalysisprogram.com/ArcGIS/rest/services/PADUS/PADUS_status/MapServer")); var gap = new esri.layers.ArcGISDynamicMapServiceLayer("http://dingo.gapanalysisprogram.com/ArcGIS/rest/services/PADUS/Ancillary/MapServer"); map.addLayer(gap); } function initFunctionality(map) { //build query task //var queryTask = new esri.tasks.QueryTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3"); var queryTask = new esri.tasks.QueryTask("http://dingo.gapanalysisprogram.com/ArcGIS/rest/services/PADUS/PADUS_status/MapServer/0"); //build query filter query = new esri.tasks.Query(); query.returnGeometry = true; //query.outFields = ["NAME", "POP2000"]; query.outFields = ["P_Des_Nm","P_Loc_Nm","Own_Name","Mang_Name"]; query.where = "State_Nm='South Carolina'"; //identify proxy page to use if the toJson payload to the geometry service is greater than 2000 characters. //If this null or not available the buffer operation will not work. Otherwise it will do a http post to the proxy. //esriConfig.defaults.io.proxyUrl = "/arcgisserver/apis/javascript/proxy/proxy.ashx"; esriConfig.defaults.io.proxyUrl = "http://dingo.gapanalysisprogram.com/proxy/proxy.ashx"; esriConfig.defaults.io.alwaysUseProxy = false; var infoTemplate = new esri.InfoTemplate(); infoTemplate.setTitle("${P_Des_Nm}"); infoTemplate.setContent("<b>Owner: </b>${Own_Name}<br/>" + "<b>Manager</b>${Mang_Name}<br/>" + "<b>Location: </b>${P_Loc_Nm}"); map.infoWindow.resize(245,125); queryTask.execute(query); dojo.connect(queryTask, "onComplete", function(featureSet) { map.graphics.clear(); var highlightSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 3), new dojo.Color([125,125,125,0.35])); //var highlightSymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 3); var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,255,255,0.35]), 1),new dojo.Color([125,125,125,0.35])); var countiesGraphicsLayer = new esri.layers.GraphicsLayer(); //QueryTask returns a featureSet. Loop through features in the featureSet and add them to the map. for (var i=0, il=featureSet.features.length; i<il; i++) { //Get the current feature from the featureSet. //Feature is a graphic var graphic = featureSet.features; graphic.setSymbol(symbol); graphic.setInfoTemplate(infoTemplate); //Add graphic to the counties graphics layer. countiesGraphicsLayer.add(graphic); } map.addLayer(countiesGraphicsLayer); map.graphics.enableMouseEvents(); //listen for when the onMouseOver event fires on the countiesGraphicsLayer //when fired, create a new graphic with the geometry from the event.graphic and add it to the maps graphics layer dojo.connect(countiesGraphicsLayer, "onMouseOver", function(evt) { map.graphics.clear(); //use the maps graphics layer as the highlight layer var content = evt.graphic.getContent(); map.infoWindow.setContent(content); var title = evt.graphic.getTitle(); map.infoWindow.setTitle(title); var highlightGraphic = new esri.Graphic(evt.graphic.geometry,highlightSymbol); map.graphics.add(highlightGraphic); map.infoWindow.show(evt.screenPoint,map.getInfoWindowAnchor(evt.screenPoint)); }); //listen for when map.graphics onMouseOut event is fired and then clear the highlight graphic //and hide the info window dojo.connect(map.graphics, "onMouseOut", function(evt) { map.graphics.clear(); map.infoWindow.hide(); }); }); queryTask.execute(query); } dojo.addOnLoad(init); </script> </head> <body class="tundra"> Hover over a protected area in South Carolina to get more information. <div id="map" style="width:900px; height:600px; border:1px solid #000;"></div> </body> </html> I looked at your map services: http://dingo.gapanalysisprogram.com/ArcGIS/rest/services/PADUS/PADUS_status/MapServer/0. The field State_Nm listed as numeric string. So your statement query.where ="State_Nm='South Carolina'"; would not work. Actually i tried it on your query page: http://dingo.gapanalysisprogram.com/ArcGIS/rest/services/PADUS/PADUS_status/MapServer/0//query. Change your query.where statement to query.where ="State_Nm='46'" (i don't know SC's code value in your layer, so i just guess it), you will get results back and u can go from there to test rest of your code. I did noticed that query returned a big number of graphics, so i am not sure your approach is going to work...
... View more
04-14-2011
05:39 AM
|
0
|
0
|
1481
|
|
POST
|
function computeZonalStats(geometry) { /*After user draws shape on map using the draw toolbar compute the zonal*/ map.showZoomSlider(); map.graphics.clear(); var symbol = new esri.symbol.SimpleFillSymbol("none", new esri.symbol.SimpleLineSymbol("dashdot", new dojo.Color([255,0,0]), 2), new dojo.Color([255,255,0,0.25])); var graphic = new esri.Graphic(geometry,symbol); map.graphics.add(graphic); toolbar.deactivate(); var features= []; features.push(graphic); var featureSet = new esri.tasks.FeatureSet(); featureSet.features = features; var params = {}; params.inputPoly = featureSet; gp.execute(params, displayResults, errorStatus); } I made a little change on your code (blow). I got "timeout exceeded" error. please check your PG settings. This thread might help: http://forums.arcgis.com/threads/15789-Long-running-gp-task-sort-of-fails. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="X-UA-Compatible" content="IE=7" /> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> <title>GP Task Population Zonal Stats</title> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.2/js/dojo/dijit/themes/claro/claro.css"> <script type="text/javascript">djConfig = { parseOnLoad:true }</script> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.2"></script> <script type="text/javascript"> dojo.require("esri.map"); dojo.require("esri.tasks.gp"); dojo.require("esri.toolbars.draw"); dojo.require("dijit.form.Button"); dojo.require("dijit.Dialog"); dojo.require("dojo.number"); var map, gp, toolbar; /*Initialize map, GP & image params*/ function init() { var initExtent = new esri.geometry.Extent({"xmin":-10726866.80142567,"ymin":3210110.331958949,"xmax":-8770078.877325676,"ymax":4667917.335413445,"spatialReference":{"wkid":102100}}); map = new esri.Map("mapDiv",{extent:initExtent}); dojo.connect(map, "onLoad", initTools); var streetMap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"); map.addLayer(streetMap); //var populationMap = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer"); //populationMap.setOpacity(0.5); //map.addLayer(populationMap); //identify proxy page to use if the toJson payload to the geoprocessing service is greater than 2000 characters. //If this null or not available the gp.execute operation will not work. Otherwise it will do a http post to the proxy. //+++++++++++++ use your own esriConfig.defaults.io.proxyUrl = "proxy.ashx"; esriConfig.defaults.io.alwaysUseProxy = false; //+++++++++++++++++++++++++++ } function initTools(map) { gp = new esri.tasks.Geoprocessor("http://certmapper.cr.usgs.gov/arcgis/rest/services/tmtools/zonal/GPServer/SumZone"); //gp.setOutSpatialReference({wkid:102100}); //gp.setProcessSpatialReference({wkid:102100}); //++++++++++++++++++++++ dojo.connect(gp, "onExecuteComplete", displayResults); dojo.connect(gp, "onError", errorStatus); //++++++++++++++++++++++ toolbar = new esri.toolbars.Draw(map); dojo.connect(toolbar, "onDrawEnd", computeZonalStats); } function computeZonalStats(geometry) { /*After user draws shape on map using the draw toolbar compute the zonal*/ map.showZoomSlider(); map.graphics.clear(); //var symbol = new esri.symbol.SimpleFillSymbol("none", new esri.symbol.SimpleLineSymbol("dashdot", new dojo.Color([255,0,0]), 2), new dojo.Color([255,255,0,0.25])); //var graphic = new esri.Graphic(geometry,symbol); var graphic = new esri.Graphic(); graphic.geometry =geometry; map.graphics.add(graphic); toolbar.deactivate(); var features= []; features.push(graphic); var featureSet = new esri.tasks.FeatureSet(); featureSet.features = features; var params = {}; params.inputPoly = featureSet; gp.execute(params); } //function statusCallback(jobInfo){ // console.log(jobInfo.jobStatus); //} //++++++++++++++++++++++++ function errorStatus(e){ alert(e.message); } //++++++++++++++++++++++++ function displayResults(result) { var content = dojo.string.substitute('<h1>The population in the user defined polygon is ${number:dojo.number.format}.</h1>',{number:results[0].value.features[0].attributes.SUM}); dijit.byId('dialog1').setContent(content); dijit.byId('dialog1').show(); } dojo.addOnLoad(init); </script> </head> <body class="claro"> <table> <tbody> <tr> <td><div dojoType="dijit.form.Button" id="drawPoly" onclick="toolbar.activate(esri.toolbars.Draw.POLYGON);map.hideZoomSlider();">Summarize Population</div></td> </tr> <tr> <td id="mapDiv" style="width:800px; height:600px; border:1px solid #000;"></td> </tr> </tbody> </table> Click the Summarize Population tool and draw a polygon on the map. When finished a GP task will be called to summarize the population within the polygon. <div dojoType="dijit.Dialog" id="dialog1" title="Population Summary"></div> </body> </html>
... View more
04-12-2011
09:59 AM
|
0
|
0
|
2611
|
|
POST
|
I am certain the json payload is being built ok because I have copied and used in on one of ESRI's samples and it works. Here it is decoded: {"geometryType":"esriGeometryPolygon","features": [{"geometry":{"rings":[[[-12035713.324158048,4906523.155443832],[-12006361.505296549,4886955.276202832],[-12035713.324158048,4877171.336582333],[-12035713.324158048,4906523.155443832]]],"spatialReference":{"wkid":102100}}}],"sr":{"wkid": 102100}} Also, here is an error Im getting in the logs. The grid does have a .vat so that isn't the problem. <Msg time='2011-04-11T15:40:16' type='ERROR' code='20010' target='tmtools/zonal.GPServerSync' methodName='GPServerSync.CheckMessages' machine='IGSKAECGAS010' process='4936' thread='1504'>Executing (SumZone): ZonalStatsSum "Feature Set" in_memory\results Start Time: Mon Apr 11 15:40:16 2011 Executing (Zonal Statistics as Table): ZonalStatisticsAsTable "Feature Set" Id c:\arcgisserver\sumzone\grid.gdb\picall_wmb in_memory\results DATA SUM Start Time: Mon Apr 11 15:40:16 2011 ERROR 010160: Unable to open raster t_t3626\t_t3626. Zonal statistics program failed ERROR 010067: Error in executing grid expression. Failed to execute (Zonal Statistics as Table). Failed at Mon Apr 11 15:40:16 2011 (Elapsed Time: 0.00 seconds) Failed to execute (SumZone). Failed at Mon Apr 11 15:40:16 2011 (Elapsed Time: 0.00 seconds)</Msg> <Msg time='2011-04-11T15:40:16' type='ERROR' code='20010' target='tmtools/zonal.GPServerSync' methodName='GPServerSync.CheckMessages' machine='IGSKAECGAS010' process='4936' thread='1504'>Error executing tool.: ERROR 010160: Unable to open raster t_t3626\t_t3626. Zonal statistics program failed ERROR 010067: Error in executing grid expression. Failed to execute (Zonal Statistics as Table). Failed to execute (SumZone).</Msg> can you provide the gp part of you code?
... View more
04-12-2011
04:43 AM
|
0
|
0
|
2611
|
|
POST
|
Hey There, I'm getting an error with one of my queries and am not sure why. I get the results I want when I query most of my layers with or without a geometry, but there is one layer that I can query without a geometry but get the #2032 error when I query with a geometry. var queryLayer:String = rbeQueryLayer;
var queryTask:QueryTask = new QueryTask(queryLayer);
var query:Query = new Query();
queryTask.disableClientCaching = true;
query.outFields = queryFields.split(",");
query.returnGeometry = true;
queryTask.useAMF = false;
if(borderCheckBox.selected == true){
query.geometry = borderGeom;
} The URL to the Layer I am getting an error with is...http://rmgsc.cr.usgs.gov/ArcGIS/rest/services/nhss_usdata/MapServer/0 Everything else seems to be working but this one. Flex API or JA API?
... View more
04-11-2011
01:05 PM
|
0
|
0
|
681
|
|
POST
|
Has anyone been able to constrain map extent to the initial extent of the map? I am wanting to limit where the user can pan the map. I want to keep the user inside of a giving county or state. Is this possible with the JavaScript API? Any and all help is appreciated. ...... dojo.require("esri.toolbars.navigation"); ...... var iniExtent, navToolbar; function init(){ ..... dojo.connect(map, "onLoad", function(){ ........ navToolbar = new esri.toolbars.Navigation(map); //bypass initLoad dojo.connect(map, "onExtentChange", function(extent){ var buffer = 5; //in my case, unit is 5 meter // set costraint extent to initExtent +buffer var constraintExtent = new esri.geometry.Extent(iniExtent.xmin - buffer, iniExtent.ymin - buffer, iniExtent.xmax + buffer, iniExtent.ymax + buffer); if (!constraintExtent.contains(extent) && !constraintExtent.intersects(extent)) { // zoom back to previous extent navToolbar.zoomToPrevExtent(); } }); ....... }); ..... }
... View more
04-11-2011
12:16 PM
|
1
|
0
|
5162
|
|
POST
|
Yes, it is there. This same code runs on my windows xp machine that has arcgis server enterprise and postgresql installed. Thanks for asking. I am hoping you'll think of something for me to check that finds the problem! I walked through the setup of the proxy code again yesterday. I had forgotten to set up the proxy folder as an application on the windows server 2008 machine. I did that step yesterday morning, but it did not fix the issue. Try to use a very simple geometry like a extent (rectangle) to do you spatial query. Doing this you by pass the proxy POST to see if it works. From what you described and the message, it seems to me that either query request is not parsed correctly to the server or it do not parsed at all (more like the last). There is related post that might help you: http://forums.arcgis.com/threads/12690-Unable-to-load-proxy
... View more
04-08-2011
06:40 AM
|
0
|
0
|
2914
|
|
POST
|
I checked the folder C:\Inetpub\wwwroot\ArcGIS\rest and did not see the arcgiswebservices user listed in the permissions, so I went ahead and added it. Unfortunately, I am still getting the same error! I am also seeing this error under the XML tab of the request (in firebug NET tab): XML Parsing Error: no element found Location: moz-nullprincipal:{a3df32b9-85a8-4045-8239-c16f41c90f1c} Line Number 1, Column 1: Do you include this script tag in your page? <script type="text/javascript"> var djConfig = { parseOnLoad: true };</script>
... View more
04-08-2011
05:43 AM
|
0
|
0
|
2914
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-11-2011 12:16 PM | |
| 1 | 05-25-2017 08:26 AM | |
| 1 | 06-02-2017 07:37 AM | |
| 1 | 06-28-2011 07:02 AM | |
| 1 | 06-12-2017 10:10 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-01-2024
09:57 PM
|