动态标绘

优质
小牛编辑
120浏览
2023-12-01

动态标绘服务用于获取标号库信息与标号信息。

使用服务前需要先申请 key。

获取标号信息资源服务地址:https://www.supermapol.com/iserver/services/plot-jingyong/rest/plot/graphicObject

获取标号信息资源接口参数说明

获取标号信息服务支持GET和HEAD请求,支持xml\json\rjson\html等表述格式。

GET 请求参数

参数名类型默认值是否必须描述
libIDint0标号库ID
codeint24标号code
inputPointsPoint2D[]线面标号的位置点
scaleValuesdouble[]线面标号的比例值
subSymbolsint[]线面标号的子标号的code数组
symbolRankint点标号的标号级别
negativeImageboolean点标号是否启用镜像
surroundLineTypeint点标号的衬线类型

所有标号库 libID 可以通过以下请求获取:

https://www.supermapol.com/iserver/services/plot-jingyong/rest/plot/symbolLibs.rjson

其中常用库的libID为22,可以通过以下请求获取该库中的所有标号code:

https://www.supermapol.com/iserver/services/plot-jingyong/rest/plot/symbolLibs/22.rjson

详细的标号及 code 如下:

警用库的 libID 为 421,可以通过以下请求获取该库中的所有标号code:

https://www.supermapol.com/iserver/services/plot-jingyong/rest/plot/symbolLibs/421.rjson

详细的标号及 code 如下:

对 graphicObject 资源执行GET请求,返回的标号信息表述的结构如下:

名称类型描述
libIDint标号库ID
codeint标号code
symbolTypeint标号类型
symbolNamestring标号名称
anchorPointPoint2D点标号的锚点
negativeImageboolean点标号是否启用镜像
symbolRankint标号级别,部分点标号支持
symbolRanksint[]标号库中定义的标号所支持的标号等级
scaleByMapboolean控制标号的大小是否跟随地图缩放
limitWidthHeightboolean锁定标号宽度、高度
symbolSizePoint2D标号大小,控制标号在地图上显示的大小
scale2DPoint3D标号的缩放比例
Rotate2DPoint3D标号的旋转角度
subSymbolsint[]线面标号的子标号集合
scaleValuesdouble[]线面标号的比例值
styleObject标号风格,包括线色、线性、填充、渐变填充等
surroundLineTypeint衬线类型
surroundLineColorColor衬线颜色
surroundLineWidth2Dint衬线宽度
textContentstring注记/文本内容
annotationPositionint注记位置
textStyle2DObject注记样式
innerCellsObject[]内部图元,构成一个标号所用到的所有图元的信息
middleMarkExistboolean标号是否存在中间注记
algoMaxExitPtsint线面标号最大编辑点个数
algoMinExitPtsint线面标号最小编辑点个数
middleMarkBoundsRectangle2D点标号中间注记范围

服务示例

https://www.supermapol.com/iserver/services/plot-jingyong/rest/plot/
graphicObject.rjson?libID=22&code=1001&inputPoints=[{"x":90.59864738806, 
"y":30.728367500373},{"x":99.385960820896, "y":34.030606306343}]&key=fvV2osxwuZWlY0wJb8FEb2i5
参数名备注
libID22标号库ID
code1001标号code
inputPoint[{"x":90.59864738806, "y":30.728367500373},{"x":99.385960820896, "y":34.030606306343}]标号位置点

响应结果

{
"algoMaxEditPts": 9999999,
"algoMinEditPts": 2,
"anchorPoint": {
"x": 0,
"y": 0
},

完整响应结果:https://www.xnip.cn/wp-content/uploads/2021/docimg30/res2.txt