File tree 2 files changed +20
-10
lines changed
2 files changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -125,11 +125,16 @@ var bfl_options = {
125
125
L . Control . betterFileLayer ( bfl_options ) . addTo ( map ) ;
126
126
127
127
map . on ( "bfl:layerloaded" , ( ev ) => {
128
- console . log ( "Your file was read successfully!! Event: " , ev ) ;
128
+ // console.log("Your file was read successfully!! Event: ", ev);
129
+ let color = $ ( `#color` ) . val ( ) ;
130
+ let weight = parseFloat ( $ ( `#weight` ) . val ( ) ) ;
129
131
shapeLayer . eachLayer ( r => {
130
132
r . setStyle ( {
131
133
opacity : $ ( '#slider2' ) . val ( ) / 100 ,
132
134
fillOpacity : $ ( '#slider1' ) . val ( ) / 100 ,
135
+ color : color ,
136
+ fillColor : color ,
137
+ weight :weight
133
138
} ) ;
134
139
} ) ;
135
140
} ) ;
@@ -209,10 +214,10 @@ function changeDimensions(reset=false, preset=false) {
209
214
}
210
215
211
216
function changeColor ( ) {
212
- var color = $ ( `#color` ) . val ( ) ;
213
-
217
+ let color = $ ( `#color` ) . val ( ) ;
218
+ let weight = parseFloat ( $ ( `#weight` ) . val ( ) ) ;
214
219
shapeLayer . eachLayer ( r => {
215
- r . setStyle ( { color : color , fillColor : color } ) ;
220
+ r . setStyle ( { color : color , fillColor : color , weight : weight } ) ;
216
221
} ) ;
217
222
218
223
}
Original file line number Diff line number Diff line change 75
75
.preset_select {
76
76
height : 2.5rem ;
77
77
}
78
+
79
+ .narrow50 {
80
+ width : 50px ;
81
+ }
78
82
</ style >
79
83
</ head >
80
84
< body >
81
- < div class ="container-fluid no-print ">
85
+ < div class ="container-fluid no-print mt-5 ">
82
86
< div class ="row ">
83
87
< div class ="col-md-4 ">
84
- < h3 > Map Printer</ h3 >
88
+ < h1 > Map Printer</ h1 >
85
89
< div class ="card card-body mb-4 ">
86
90
< ul >
87
91
< li > Drag-drop a shape file (preferably .geojson format) onto this map to display its border.</ li >
@@ -99,7 +103,7 @@ <h3>Map Printer</h3>
99
103
</ div >
100
104
< div class ="col-md-5 ">
101
105
102
- < h3 > Customize the map </ h3 >
106
+ < h3 > Print page size </ h3 >
103
107
< p class ="mb-2 "> Change page dimensions: < small > can make it big!</ small > </ p >
104
108
< p class ="mb-2 "> Width:< input class ="width narrow90 " size ="5 " value ="1000 " type ="number " min ="100 " max ="100000 " step ="10 "> px,
105
109
Height:< input class ="height narrow90 " size ="5 " value ="1450 " type ="number " min ="100 " max ="100000 " step ="10 "> px
@@ -131,9 +135,10 @@ <h3>Customize the map</h3>
131
135
</ p >
132
136
< p > Page status: < span id ="tileStatus "> </ span > </ p >
133
137
134
- < p > Change color: < input id ="color " value ="black " size ="8 ">
135
-
136
- < button onclick ="changeColor() " class ="btn btn-info "> Apply</ button >
138
+ < h3 > Shape</ h3 >
139
+ < p > Color: < input id ="color " value ="black " size ="4 ">
140
+ Border size: < input id ="weight " value ="4 " class ="narrow50 " type ="number ">
141
+ < button onclick ="changeColor() " class ="btn btn-outline-success "> Apply</ button >
137
142
</ p >
138
143
139
144
< br >
You can’t perform that action at this time.
0 commit comments