Leaflet Map Control.Zoom—带有两个按钮的基本缩放控件

Leaflet Map Control.Zoom—带有两个按钮的基本缩放控件

带有两个按钮(放大和缩小)的基本缩放控件。除非将其zoomControl选项设置为false,否则默认情况下会将其放置在地图上。扩展控制。

Creation

FactoryDescription
L.control.zoom(<Control.Zoom optionsoptions)Creates a zoom control
创建缩放控件

Options

OptionTypeDefaultDescription
zoomInTextString'<span aria-hidden="true">+</span>'The text set on the ‘zoom in’ button.
“放大”按钮上设置的文本。
zoomInTitleString'Zoom in'The title set on the ‘zoom in’ button.
“放大”按钮上设置的标题。
zoomOutTextString'<span aria-hidden="true">&#x2212;</span>'The text set on the ‘zoom out’ button.
“缩小”按钮上设置的文本。
zoomOutTitleString'Zoom out'The title set on the ‘zoom out’ button.
“缩小”按钮上设置的标题。

▶ Options inherited from Control

OptionTypeDefaultDescription
positionString'topright'The position of the control (one of the map corners). Possible values are 'topleft''topright''bottomleft' or 'bottomright'
控件的位置(地图角之一)。可能的值为“topleft”、“topright”、“bottomleft”或“bottomright”

Methods

▶ Methods inherited from Control

MethodReturnsDescription
getPosition()stringReturns the position of the control.
返回控件的位置。
setPosition(<string> position)thisSets the position of the control.
设置控件的位置。
getContainer()HTMLElementReturns the HTMLElement that contains the control.
返回包含控件的HTMLElement。
addTo(<Mapmap)thisAdds the control to the given map.
将控件添加到给定的映射。
remove()thisRemoves the control from the map it is currently active on.
从当前处于活动状态的贴图中删除控件。
1 1 投票
文章评分
订阅评论
提醒
0 评论
内联反馈
查看所有评论
0
希望看到您的想法,请您发表评论x