You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would love to display my legend in the "topcenter" area of the map as all the other corners are used by buttons, and other controls as shown in this example:
the problem is that the "topcenter" doesn't exist in leaflet/ipyleaflet. option A would be to customize the css of one of the existing corner but they won't be usable anymore. looking on the web I found this workaround for leaflet (https://stackoverflow.com/a/60391674/6734243):
L.Map.include({_initControlPos: function(){varcorners=this._controlCorners={},l='leaflet-',container=this._controlContainer=L.DomUtil.create('div',l+'control-container',this._container);functioncreateCorner(vSide,hSide){varclassName=l+vSide+' '+l+hSide;corners[vSide+hSide]=L.DomUtil.create('div',className,container);}createCorner('top','left');createCorner('top','right');createCorner('bottom','left');createCorner('bottom','right');createCorner('top','center');createCorner('middle','center');createCorner('middle','left');createCorner('middle','right');createCorner('bottom','center');}});//Now you have 5 new positions to use.
Is there a way I can reach this level of customization from my side ? If yes where should I add the javascript part ?
The text was updated successfully, but these errors were encountered:
I would love to display my legend in the "topcenter" area of the map as all the other corners are used by buttons, and other controls as shown in this example:
the problem is that the "topcenter" doesn't exist in leaflet/ipyleaflet. option A would be to customize the css of one of the existing corner but they won't be usable anymore. looking on the web I found this workaround for leaflet (https://stackoverflow.com/a/60391674/6734243):
Is there a way I can reach this level of customization from my side ? If yes where should I add the javascript part ?
The text was updated successfully, but these errors were encountered: