EXAMPLE:
http://geocatmin.ingemmet.gob.pe/arcgis/rest/services/SERV_CARTOGRAFIA_DEMARCACION_WGS84/MapServer/0/query?where=&text=&objectIds=&time=&geometry=%7B%0D%0A%22x%22+%3A+-75.954001%2C+%22y%22+%3A+-7.740334%2C+%22spatialReference%22+%3A+%7B%22wkid%22+%3A+4326%7D%0D%0A%7D&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=4326&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&f=html
I want to get the same result as the example.
I'm doing wrong.?
var queryTaskGeoCatmin = new QueryTask("http://geocatmin.ingemmet.gob.pe/arcgis/rest/services/SERV_CARTOGRAFIA_DEMARCACION_WGS84/MapServer/0");
var queryGeocatmin = new Query();
queryGeocatmin.outSpatialReference = [{wkid:4326}];
queryGeocatmin.SpatialRelationship = "esriSpatialRelIntersects";
queryGeocatmin.geometryType = "point";
queryGeocatmin.geometry ={f: "json", x :-75.954001, y :-7.740334};
queryGeocatmin.outFields = ["*"];
queryTaskGeoCatmin.execute(queryAmbito, resultGeocatmin);
function resultGeocatmin(queryAmbito){
console.log(queryAmbito);
}
Heber,
You have some of your properties wrong:
var queryGeocatmin = new Query(); queryGeocatmin.outSpatialReference = new esri.SpatialReference({wkid:4326}); queryGeocatmin.SpatialRelationship = esri.tasks.Query.SPATIAL_REL_INTERSECTS; queryGeocatmin.geometry = new esri.geometry.point(-75.954001,-7.740334, new esri.SpatialReference({ wkid: 4326 })); queryGeocatmin.outFields = ["*"]; queryTaskGeoCatmin.execute(queryAmbito, resultGeocatmin);
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und vieles mehr. Neu hier? Erstelle ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.