12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <!--********************************************************************
- * Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
- *********************************************************************-->
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title data-i18n="resources.title_plotSymbol"></title>
- <style type="text/css">
- #map {
- position: absolute;
- left: 250px;
- right: 0px;
- height: 100%;
- }
- #plottingPanel {
- float: left;
- background: #ffffff;
- width: 250px;
- height: 100%;
- border: 1px solid #3473b7;
- }
- </style>
- </head>
- <body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
- <div id="toolbar" class="panel panel-primary" style="position: absolute;top: 15px;right: 60px;text-align: center;z-index: 9999;border-radius: 4px;">
- <div class='panel-heading' id="panelheading">
- <h5 class='panel-title text-center' data-i18n="resources.title_plotSymbol" style=" color: #ffffff;font-size: 16px;"></h5></div>
- <div class='panel-body content' id="panelbodycontent" >
- <div align='right' class='button-group'>
- <input type="button" class="btn btn-default" data-i18n="[value]resources.btn_cancelMarker" onclick="PlottingDrawCancel()"/>
- <input type="button" class="btn btn-default" data-i18n="[value]resources.btn_clearPlot" onclick="clearLayers()"/>
- </div>
- </div>
- </div>
- <div id="plottingPanel">
- <div class="easyui-panel" style="position:absolute;top:0px;bottom:0px;left:0px;right:0px;padding:5px; width: 100%;">
- <div class="easyui-tabs" style="width: 100%;height: 100%">
- <div id="plotPanel" data-i18n="[title]resources.text_drawPanel" style="overflow: hidden"></div>
- </div>
- </div>
- </div>
- <div id="map">
- </div>
- <script type="text/javascript" include="bootstrap,plottingPanel" src="../js/include-web.js"></script>
- <script type="text/javascript" include="iclient-plot-leaflet" src="../../dist/leaflet/include-leaflet.js"></script>
- <script type="text/javascript" include="PlotPanel" src="../js/plottingPanel/PlottingPanel.Include.js"></script>
- <script type="text/javascript">
- var host = window.isLocal ? window.server : "https://iserver.supermap.io";
- var url = host + "/iserver/services/map-china400/rest/maps/China_4326";
- var serverUrl = host + "/iserver/services/plot-jingyong/rest/plot/";
- var map;
- map = L.map('map', {
- preferCanvas: true,
- crs: L.CRS.EPSG4326,
- center: [35, 104],
- maxZoom: 18,
- zoom: 3
- });
- L.supermap.tiledMapLayer(url).addTo(map);
- var plottingLayer = L.supermap.plotting.plottingLayer("plot", serverUrl);
- plottingLayer.spatialAnalystUrl=host+"/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst";
- plottingLayer.addTo(map);
- var drawControl = L.supermap.plotting.drawControl(plottingLayer);
- drawControl.addTo(map);
- var editControl = L.supermap.plotting.editControl();
- editControl.addTo(map);
- L.supermap.plotting.initPlotPanel("plotPanel", serverUrl, drawControl);
- function clearLayers(){
- plottingLayer.removeAllFeatures();
- }
- function PlottingDrawCancel(){
- drawControl.handler.disable();
- }
- $(document).ready(function(){
- $('#panelheading').click(function(){
- $('#panelbodycontent').toggle();
- });
- });
- </script>
- </body>
- </html>
|