Supermap GIS二次开发

开发工具与关键技术:iDesktop  Supermap GIS

作者:陈芝番

撰写时间:2020.5.13

目录

1.地图发布

2.选择工作空间类型

3.选择发布的服务类型

4.服务接口

5.地图

6.图层管理器

7.分布图

8.几何圆查询

总结


Supermap GIS 从开发工具安装,许可配置,数据集的导入,制图,性能优化,地图的发布都体现的Supermap GIS 制图严谨;那么还需要借助iserver驱动。

1.地图发布

发布一个地图需要选择文件工作空间或数据库工作空间,

2.选择工作空间类型

3.选择发布的服务类型

选择REST-地图服务,REST-数据服务,WMS1.1.1服务,WMS1.3.0服务大致就可以了

4.服务接口

http://localhost:8090/iserver/services/map-Gzsbyqmanxingbing/rest/maps/Baiyunqu@Guangzhoushibaiyunqu

5.地图

<div id="map">
  </div>
//host = document.location.toString().match(/file:\/\//)?"http://localhost:8090":'http://' + document.location.host,
url = "http://localhost:8090/iserver/services/map-Gzsbyqmanxingbing/rest/maps/Baiyunqu@Guangzhoushibaiyunqu";

 6.图层管理器

 <div id="LayerController">
            <div id="LayerControllerTitle">
                <span style="color:#fff">图层控制器</span>
                <a href="javascript:void(0)" class="CloseLayerController" onclick="CloseLayerController()">
                </a>
            </div>
            <div id="LayerControllerContent">
                <ul>
                    <li>
                        <label><input type="checkbox" checked="checked" onclick="ClickWeiXingFireHouseLayer(this)" /> <img src="~/content/images/l.png" class="imagesclass" />运行中</label>
                    </li>                   
                    <li>
                        <label><input type="checkbox" checked="checked" onclick="ClickSmallFirehouse(this)" /> <img src="~/content/images/k.png" class="imagesclass" />规划中</label>
                    </li>                               
                    <li>
                        <label><input type="checkbox" checked="checked" id="ClickSheQuWeb" onclick="ClickSheQuWeb(this)" /><img src="~/content/images/j.png" class="imagesclass" style="margin-left: 3px;" />已停业</label>
                    </li>
                </ul>
            </div>
        </div>

 7.分布图

layer = new SuperMap.Layer.TiledDynamicRESTLayer("行政区划图", url, { transparent: true, cacheEnabled: true }, { maxResolution: "auto" });
                layer.events.on({"layerInitialized":addLayer});
                vectorLayer = new SuperMap.Layer.Vector("社康分布图");
                vectorLayer1 = new SuperMap.Layer.Vector("药店分布图");
                vectorLayer2 = new SuperMap.Layer.Vector("病例分布散点图");
                vectorLayer3 = new SuperMap.Layer.Vector("病例分布热力图");
                vectorLayer4 = new SuperMap.Layer.Vector("病原基因分布图");
                vectorLayer5 = new SuperMap.Layer.Vector("疫情预警提醒");             
                markerLayer = new SuperMap.Layer.Markers("医院分布图");

8.几何圆查询

  drawPolygon1 = new SuperMap.Control.DrawFeature(vectorLayer, SuperMap.Handler.RegularPolygon,{handlerOptions:{sides:50}});
                drawPolygon1.events.on({"featureadded": drawCompleted});

 //多边形查询
                drawPolygon2 = new SuperMap.Control.DrawFeature(vectorLayer, SuperMap.Handler.Polygon);
                drawPolygon2.events.on({"featureadded": drawCompleted});

 //点查询
                drawPoint = new SuperMap.Control.DrawFeature(vectorLayer, SuperMap.Handler.Point);
                drawPoint.events.on({"featureadded": drawPointCompleted});
                //线查询
                drawLine = new SuperMap.Control.DrawFeature(vectorLayer, SuperMap.Handler.Path);
                drawLine.events.on({"featureadded": drawPointCompleted});

  //矩形
                drawRectangle = new SuperMap.Control.DrawFeature(vectorLayer, SuperMap.Handler.Box);
                drawRectangle.events.on({"featureadded": drawRectangleCompleted});   

总结:

当然学习过程,需要多思考,多动手,多总结。那么提高软件知识和技术只是问题的表面,本质是要提高自己认识问题,分析问题,解决问题的思想高度。规划出的事,需要按照规划一步一步去实施,去实践,停留在纸张上的规划只是摆设,只有按规划去实施,才能做出更好的成绩!

猜你喜欢

转载自blog.csdn.net/qq_44554890/article/details/106139272
今日推荐