以前学生的时候只知道 Server 能做个分析,能返回个图或者要素 JSON,RESTAPI 也是工作之后才逐渐知道的。
MapServer 和 FeatureServer 都能容纳 FeatureLayer
,访问 FeatureLayer
的 RESTAPI 即
MapServer/{featureLayerIndex}
FeatureServer/{featureLayerIndex}
MapServer/{featureLayerIndex}/query?where=1%3D1&returnCountOnly=true&f=json
FeatureServer/{featureLayerIndex}/query?where=1%3D1&returnCountOnly=true&f=json
以官方 FeatureServer 为例(直接把下面的地址粘贴到浏览器窗口):
https://www.geosceneonline.cn/server/rest/services/2006%E8%87%B32021%E5%B9%B4%E4%B8%AD%E5%9B%BD%E5%9B%BD%E5%AE%B6%E7%BA%A7%E9%9D%9E%E7%89%A9%E8%B4%A8%E6%96%87%E5%8C%96%E9%81%97%E4%BA%A7%E7%A9%BA%E9%97%B4%E5%88%86%E5%B8%83/MapServer/0/query?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&distance=&units=esriSRUnit_Foot&relationParam=&outFields=&returnGeometry=false&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&havingClause=&returnIdsOnly=false&returnCountOnly=true&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&historicMoment=&returnDistinctValues=false&resultOffset=&resultRecordCount=&returnExtentOnly=false&datumTransformation=¶meterValues=&rangeValues=&quantizationParameters=&featureEncoding=esriDefault&f=json
返回
{
"count": 3610
}
或者
https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/applyedits_fieldsTest/FeatureServer/0/query?where=1%3D1&returnCountOnly=true&f=pjson
返回
{
"count": 16,
"serverGens": {
"minServerGen": 1848376,
"serverGen": 4380974
}
}
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://www.cnblogs.com/onsummer/p/16443915.html
内容来源于网络,如有侵权,请联系作者删除!