5
5
< title data-i18n ="resources.title_defaultStyle "> </ title >
6
6
< script type ="text/javascript " include ="bootstrap-css,responsive,colorpicker " src ="../js/include-web.js "> </ script >
7
7
</ head >
8
- < body style =" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0; ">
9
- < div id ="toolbar " class ="panel panel-primary " style ="position: absolute;top: 10px;right: 10px;width: 300px;text-align: center;z-index: 800;border-radius: 4px; ">
8
+ < body style =" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0; ">
9
+ < div id ="toolbar " class ="panel panel-primary "
10
+ style ="position: absolute;top: 10px;right: 10px;width: 300px;text-align: center;z-index: 800;border-radius: 4px; ">
10
11
< div class ='panel-heading '>
11
12
< h5 class ='panel-title text-center '> 缺省属性</ h5 > </ div >
12
13
< div class ='panel-body content '>
@@ -15,29 +16,29 @@ <h5 class='panel-title text-center'>缺省属性</h5></div>
15
16
< span class ='input-group-addon '> 线宽:</ span >
16
17
< input type ='text ' class ='form-control ' id ='lineWidth ' value ='2 ' onchange ="lineWidthChanges() "/>
17
18
</ div >
18
- < div class ='input-group ' style ="margin-bottom: 15px; ">
19
+ < div class ='input-group ' style ="margin-bottom: 15px; ">
19
20
< span class ='input-group-addon '> 线型:</ span >
20
21
< select class ='form-control ' id ='lineStyle ' onchange ="lineStyleChanges() ">
21
- < option value ='0,0 ' > solid</ option >
22
+ < option value ='0,0 '> solid</ option >
22
23
< option value ='1,5 '> dot</ option >
23
24
< option value ='5,10 '> dash</ option >
24
25
< option value ='5,5,1,5 '> dashdot</ option >
25
26
< option value ='10,5 '> longdash</ option >
26
27
< option value ='15,10,5,10 '> longdashdot</ option >
27
28
</ select >
28
29
</ div >
29
- < div class ='input-group 'style ="margin-bottom: 15px; ">
30
+ < div class ='input-group ' style ="margin-bottom: 15px; ">
30
31
< span class ='input-group-addon '> 线色:</ span >
31
32
< input type ="text " id ="lineColor " value ="" class ='form-control '/>
32
33
< span class ='input-group-addon '> < img src ='../img/colorpicker.png ' id ="cp1 "
33
- style ="cursor:pointer z-index: 9999; " /> </ span >
34
+ style ="cursor:pointer z-index: 9999; "/> </ span >
34
35
</ div >
35
36
36
- < div class ='input-group 'style ="margin-bottom: 15px; ">
37
+ < div class ='input-group ' style ="margin-bottom: 15px; ">
37
38
< span class ='input-group-addon '> 标号宽度:</ span >
38
39
< input type ='text ' class ='form-control ' id ='symbolWidth ' value ='40 ' onchange ="symbolWidthChanges() "/>
39
40
</ div >
40
- < div class ='input-group 'style ="margin-bottom: 15px; ">
41
+ < div class ='input-group ' style ="margin-bottom: 15px; ">
41
42
< span class ='input-group-addon '> 标号高度:</ span >
42
43
< input type ='text ' class ='form-control ' id ='symbolHeight ' value ='40 ' onchange ="symbolHeightChanges() "/>
43
44
</ div >
@@ -54,12 +55,13 @@ <h5 class='panel-title text-center'>缺省属性</h5></div>
54
55
</ div >
55
56
</ div >
56
57
< div id ="map " style ="margin:0 auto;width: 100%;height: 100% "> </ div >
57
- < script type ="text/javascript " include ="leaflet,iclient9-leaflet,iclient9-leaflet-css,iclient9-plot-leaflet " src ="../../dist/include-leaflet.js "> </ script >
58
+ < script type ="text/javascript " include ="leaflet,iclient9-leaflet,iclient9-leaflet-css,iclient9-plot-leaflet "
59
+ src ="../../dist/include-leaflet.js "> </ script >
58
60
< script type ="text/javascript ">
59
61
var host = window . isLocal ? window . server : "http://support.supermap.com.cn:8090" ;
60
62
var url = host + "/iserver/services/map-world/rest/maps/World" ;
61
63
var serverUrl = host + "/iserver/services/plot-jingyong/rest/plot/" ;
62
- var map , symbolLibManager ;
64
+ var map , symbolLibManager ;
63
65
map = L . map ( 'map' , {
64
66
preferCanvas : true ,
65
67
crs : L . CRS . EPSG4326 ,
@@ -75,12 +77,12 @@ <h5 class='panel-title text-center'>缺省属性</h5></div>
75
77
var editControl = L . supermap . plotting . editControl ( ) ;
76
78
editControl . addTo ( map ) ;
77
79
var plotting = L . supermap . plotting . getControl ( map , serverUrl ) ;
78
- function loadSymbolLib ( ) {
80
+ function loadSymbolLib ( ) {
79
81
symbolLibManager = plotting . getSymbolLibManager ( ) ;
80
- symbolLibManager . on ( L . supermap . plotting . event . initializecompleted , initializeCompleted ) ;
82
+ symbolLibManager . on ( L . supermap . plotting . event . initializecompleted , initializeCompleted ) ;
81
83
symbolLibManager . initializeAsync ( ) ;
82
84
}
83
- function initializeCompleted ( ) {
85
+ function initializeCompleted ( ) {
84
86
initHtml ( ) ;
85
87
}
86
88
function initHtml ( ) {
@@ -125,16 +127,16 @@ <h5 class='panel-title text-center'>缺省属性</h5></div>
125
127
}
126
128
}
127
129
128
- function plotSymbol ( ) {
130
+ function plotSymbol ( ) {
129
131
drawControl . handler . serverUrl = serverUrl ;
130
132
drawControl . handler . libID = 421 ;
131
133
drawControl . handler . code = 20100 ;
132
134
drawControl . handler . enable ( ) ;
133
135
}
134
- function PlottingDrawCancel ( ) {
136
+ function PlottingDrawCancel ( ) {
135
137
drawControl . handler . disable ( ) ;
136
138
}
137
- function PlottingClear ( ) {
139
+ function PlottingClear ( ) {
138
140
plottingLayer . removeAllFeatures ( ) ;
139
141
}
140
142
@@ -155,7 +157,7 @@ <h5 class='panel-title text-center'>缺省属性</h5></div>
155
157
PlottingDrawCancel ( ) ;
156
158
plotting . getDefaultStyle ( ) . lineColor = document . getElementById ( "lineColor" ) . value ;
157
159
}
158
- window . onload = function ( ) {
160
+ window . onload = function ( ) {
159
161
loadSymbolLib ( ) ;
160
162
} ;
161
163
</ script >
0 commit comments