File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 9
9
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
10
10
<![endif]-->
11
11
< style >
12
- body { margin : 0 ; padding : 0 ; }
12
+ body { margin : 0 ; padding : 0 ; font-family : arial; }
13
13
# map { position : absolute; top : 0 ; bottom : 0 ; width : 100% ; }
14
+ # toggle-readonly { position : absolute; bottom : 0 ; left : 0 ; background-color : red; color : # 000 ; padding : 20px ; font-size : 2em ; cursor : pointer; }
14
15
</ style >
15
16
</ head >
16
17
< body >
17
18
< div id ="map "> </ div >
19
+ < div id ="toggle-readonly "> Toggle Readonly</ div >
18
20
< script type ="text/javascript ">
19
21
20
22
var map = L . map ( 'map' ) . setView ( [ 51.505 , - 0.09 ] , 13 ) ;
36
38
] , {
37
39
weight : 5
38
40
} ) . addTo ( map ) ;
41
+
42
+ // Trigger for toggling readonly property
43
+ var readOnly = false ;
44
+ document . getElementById ( 'toggle-readonly' ) . onclick = function ( ) {
45
+ readOnly = ! readOnly ;
46
+ plottedPolyline . setReadOnly ( readOnly ) ;
47
+ }
48
+
39
49
</ script >
40
50
</ body >
41
51
</ html >
You can’t perform that action at this time.
0 commit comments