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 99 <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
1010 <![endif]-->
1111 < style >
12- body { margin : 0 ; padding : 0 ; }
12+ body { margin : 0 ; padding : 0 ; font-family : arial; }
1313 # 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; }
1415 </ style >
1516</ head >
1617< body >
1718 < div id ="map "> </ div >
19+ < div id ="toggle-readonly "> Toggle Readonly</ div >
1820 < script type ="text/javascript ">
1921
2022 var map = L . map ( 'map' ) . setView ( [ 51.505 , - 0.09 ] , 13 ) ;
3638 ] , {
3739 weight : 5
3840 } ) . 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+
3949 </ script >
4050</ body >
4151</ html >
You can’t perform that action at this time.
0 commit comments