POST
|
What have you tried? What errors are you seeing? Do you see the request going to the layer in your map service? Consider using 3.0 as it is the latest version of the API. Further explanation? Please! Thanks
... View more
07-11-2012
12:46 AM
|
0
|
0
|
528
|
POST
|
Im Problem findtask need help: do not show results it is empty DataMAp: http://www.mediafire.com/download.php?qyg3b97pzpngcqb 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,IE=9" /> <!--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>Simple Find</title> <link rel="stylesheet" type="text/css" href="http://localhost/arcgis_js_api/library/1.6/arcgis/js/dojo/dijit/themes/claro/claro.css"> <script type="text/javascript" src="http://localhost/arcgis_js_api/library/1.6/arcgis/"></script> <script type="text/javascript"> dojo.require("esri.map"); dojo.require("esri.tasks.find"); var find, params; function init() { find = new esri.tasks.FindTask("http://localhost/ArcGIS/rest/services/gisDuLich/DuLich/MapServer"); params = new esri.tasks.FindParameters(); params.contains=true; params.returnGeometry=true; params.layerIds = [0,1,2,3,4,5,6,7,8]; params.searchFields = ['maDoiTuong','danhTuChung','diaDanh','diaChi','doiTuong','maNhanDang','ngayThuNhan','ngayCapNhat','maDoiTuong','maDonViHanhChinh','danhTuChung','diaDanh','dienTich','nhandang','ten']; } function doFind() { params.searchText = dojo.byId("searchText1").value; find.execute(params, showResults); } function showResults(results) { alert("Don't shows results "+results); var result, attribs; var s = ["<table border=\"1\"><thead><tr style=\"background-color:#ccc;\"><td>OBJECTID</td><td>Dia Danh</td></tr></thead><tbody id=\"states\">"]; dojo.forEach(results,function(result){ attribs = result.feature.attributes; alert(result.feature.attributes); for (j in result.feature.attributes) { alert(j); if (j.toUpperCase() != "OBJECTID" && j.toUpperCase() != "SHAPE") if (result.feature.attributes .toUpperCase() != "NULL") s.push("<tr><td>" + j + "</td><td>" + result.feature.attributes + "</td></tr>"); } }); s.push("</tbody></table>"); dojo.byId("tbl").innerHTML = s.join(""); } dojo.addOnLoad(init); </script> </head> <body class="claro"> Dia Danh: <input type="text" id="searchText1" size="40" value="Trường" /> <input type="button" value="Find" onclick="doFind()" /> <div id="tbl"></div> </body> </html> HELP ME PLEASE!
... View more
06-27-2012
01:59 AM
|
0
|
0
|
528
|
POST
|
When you perform Find from your web browser, do you use the same parameters that your application use? Can you verify that these parameters are correct and both app and browser yield to same result? Please refer to post#14 from this thread to guide you on what to look for when running Fiddler with your app http://forums.arcgis.com/threads/14730-Area-And-Perimeter Appending "&f=json" to the Url should not have caused this error. I tried the same here: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/find?searchText=Alabama&contains=true&searchFields=&sr=&layers=1&returnGeometry=true&f=pjson HELP! { "error" : { "code" : 500, "message" : "Object reference not set to an instance of an object.", "details" : [] } }
... View more
06-22-2012
01:28 AM
|
0
|
0
|
99
|
POST
|
Im Problem findtask need help: do not show results it is empty DataMAp: http://www.mediafire.com/download.php?qyg3b97pzpngcqb 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,IE=9" /> <!--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>Simple Find</title> <link rel="stylesheet" type="text/css" href="http://localhost/arcgis_js_api/library/1.6/arcgis/js/dojo/dijit/themes/claro/claro.css"> <script type="text/javascript" src="http://localhost/arcgis_js_api/library/1.6/arcgis/"></script> <script type="text/javascript"> dojo.require("esri.map"); dojo.require("esri.tasks.find"); var find, params; function init() { find = new esri.tasks.FindTask("http://localhost/ArcGIS/rest/services/gisDuLich/DuLich/MapServer"); params = new esri.tasks.FindParameters(); params.contains=true; params.returnGeometry=true; params.layerIds = [0,1,2,3,4,5,6,7,8]; params.searchFields = ['maDoiTuong','danhTuChung','diaDanh','diaChi','doiTuong','maNhanDang','ngayThuNhan','ngayCapNhat','maDoiTuong','maDonViHanhChinh','danhTuChung','diaDanh','dienTich','nhandang','ten']; } function doFind() { params.searchText = dojo.byId("searchText1").value; find.execute(params, showResults); } function showResults(results) { alert("Don't shows results "+results); var result, attribs; var s = ["<table border=\"1\"><thead><tr style=\"background-color:#ccc;\"><td>OBJECTID</td><td>Dia Danh</td></tr></thead><tbody id=\"states\">"]; dojo.forEach(results,function(result){ attribs = result.feature.attributes; alert(result.feature.attributes); for (j in result.feature.attributes) { alert(j); if (j.toUpperCase() != "OBJECTID" && j.toUpperCase() != "SHAPE") if (result.feature.attributes .toUpperCase() != "NULL") s.push("<tr><td>" + j + "</td><td>" + result.feature.attributes + "</td></tr>"); } }); s.push("</tbody></table>"); dojo.byId("tbl").innerHTML = s.join(""); } dojo.addOnLoad(init); </script> </head> <body class="claro"> Dia Danh: <input type="text" id="searchText1" size="40" value="Trường" /> <input type="button" value="Find" onclick="doFind()" /> <div id="tbl"></div> </body> </html> Newbie please help! Thanks
... View more
06-22-2012
12:32 AM
|
0
|
0
|
528
|
POST
|
Im Problem findtask need help: do not show results it is empty DataMAp: http://www.mediafire.com/download.php?qyg3b97pzpngcqb 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,IE=9" /> <!--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>Simple Find</title> <link rel="stylesheet" type="text/css" href="http://localhost/arcgis_js_api/library/1.6/arcgis/js/dojo/dijit/themes/claro/claro.css"> <script type="text/javascript" src="http://localhost/arcgis_js_api/library/1.6/arcgis/"></script> <script type="text/javascript"> dojo.require("esri.map"); dojo.require("esri.tasks.find"); var find, params; function init() { find = new esri.tasks.FindTask("http://localhost/ArcGIS/rest/services/gisDuLich/DuLich/MapServer"); params = new esri.tasks.FindParameters(); params.contains=true; params.returnGeometry=true; params.layerIds = [0,1,2,3,4,5,6,7,8]; params.searchFields = ['maDoiTuong','danhTuChung','diaDanh','diaChi','doiTuong','maNhanDang','ngayThuNhan','ngayCapNhat','maDoiTuong','maDonViHanhChinh','danhTuChung','diaDanh','dienTich','nhandang','ten']; } function doFind() { params.searchText = dojo.byId("searchText1").value; find.execute(params, showResults); } function showResults(results) { alert("Don't shows results "+results); var result, attribs; var s = ["<table border=\"1\"><thead><tr style=\"background-color:#ccc;\"><td>OBJECTID</td><td>Dia Danh</td></tr></thead><tbody id=\"states\">"]; dojo.forEach(results,function(result){ attribs = result.feature.attributes; alert(result.feature.attributes); for (j in result.feature.attributes) { alert(j); if (j.toUpperCase() != "OBJECTID" && j.toUpperCase() != "SHAPE") if (result.feature.attributes .toUpperCase() != "NULL") s.push("<tr><td>" + j + "</td><td>" + result.feature.attributes + "</td></tr>"); } }); s.push("</tbody></table>"); dojo.byId("tbl").innerHTML = s.join(""); } dojo.addOnLoad(init); </script> </head> <body class="claro"> Dia Danh: <input type="text" id="searchText1" size="40" value="Trường" /> <input type="button" value="Find" onclick="doFind()" /> <div id="tbl"></div> </body> </html>
... View more
06-21-2012
07:08 PM
|
0
|
8
|
1041
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|