query.spatialRelationship = esri.tasks.Query.SPATIAL_REL_INTERSECTS;
query.geometry = pointToPolygon(map, evt.mapPoint.x, evt.mapPoint.y, 200); function pointToPolygon(map, pointX, pointY, tolerance){ var xmin = pointX - tolerance; var ymin = pointY - tolerance; var xmax = pointX + tolerance; var ymax = pointY + tolerance; var extent = new Extent(xmin, ymin, xmax, ymax, map.spatialReference) var polygon = new Polygon(new SpatialReference({wkid:102100})); polygon.addRing([[extent.xmin, extent.ymin], [extent.xmin, extent.ymax], [extent.xmax, extent.ymax], [extent.xmax, extent.ymin]]); return polygon }
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.