回答

0

也许这个插件是为你:https://github.com/buche/leaflet-languageselector

EDIT :

的问题在于你使用的只是png文件。在缩放时,您可以在您的network console中看到加载的文件。它看起来像这样:

Leaflet tile

enter image description here

这不是纯HTML/CSS所以你不能访问的国家的名称,将其更改为所需的语言。

您将需要使自己瓦片或在这里找到另一牌提供商:http://leaflet-extras.github.io/leaflet-providers/preview/(这是不是真的很棒......)

,因为他们使用矢量您也可以尝试mapbox:https://www.mapbox.com/help/change-language/

https://www.mapbox.com/help/change-language/#change-label-language-in-mapbox-studio-classic

+0

感谢您的答复@Baptiste .leaflet语言的选择仅仅是一个语言选择器选择语言。它不会申请通过了语言map.Canü请提出一个办法适用于通过此插件提供语言选择的点击语言变化。 – swathi

+0

我已更新我的答案! – Baptiste

+0

谢谢巴蒂斯特。 – swathi