File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -179,39 +179,6 @@ function createUserMenuControl(options) {
179179 return control ;
180180}
181181
182- /**
183- * Create legend control instance on the bottom right of the map.
184- * The legend contains the icon and the name of the role:
185- * 1. User
186- * 2. Trainer
187- * 3. Developer
188- *
189- * @returns {object } control
190- */
191- function createLegendControl ( ) {
192- var control ;
193- control = L . Control . extend ( {
194- options : {
195- position : 'bottomright'
196- } ,
197- onAdd : function ( ) {
198- var legend_container = L . DomUtil . create ( 'div' ,
199- 'info legend' ) ;
200- legend_container . innerHTML += $ ( "#legend" ) . html ( ) ;
201-
202- //Prevent firing drag and onClickMap event when clicking this control
203- var stop = L . DomEvent . stopPropagation ;
204- L . DomEvent
205- . on ( legend_container , 'click' , stop )
206- . on ( legend_container , 'mousedown' , stop )
207- . on ( legend_container , 'dblclick' , stop )
208- . on ( legend_container , 'click' , L . DomEvent . preventDefault ) ;
209- return legend_container ;
210- }
211- } ) ;
212- return control ;
213- }
214-
215182/**
216183 * Listener to geolocation. Called when location is found.
217184 * NOTE:
Original file line number Diff line number Diff line change 9393 } ;
9494 user_menu_control = createUserMenuControl ( user_menu ) ;
9595 map . addControl ( new user_menu_control ) ;
96- $ ( ".user-menu-control" ) . tooltip ( { placement : 'right' ,
97- container : 'body' } ) ;
98-
99- // Create Legend Control:
100- legend_control = createLegendControl ( ) ;
101- map . addControl ( new legend_control ) ;
96+ $ ( ".user-menu-control" ) . tooltip ( { placement : 'right' , container : 'body' } ) ;
10297</ script >
10398
10499{% block js_container %}
Original file line number Diff line number Diff line change @@ -87,14 +87,6 @@ <h3 class="modal-title">Request Edit Link</h3>
8787 users_layer . addTo ( map ) ;
8888 developers_layer . addTo ( map ) ;
8989 trainers_layer . addTo ( map ) ;
90-
91- //Specify all layers on overlays_layers control
92- overlays_layer = {
93- "Users" : users_layer ,
94- "Developers" : developers_layer ,
95- "Trainers" : trainers_layer
96- }
97- L . control . layers ( null , overlays_layer ) . addTo ( map )
9890 } )
9991 </ script >
10092{% endblock %} <!--endblock of js_container -->
You can’t perform that action at this time.
0 commit comments