js input上传单文件
I’m working on a new project that requires lots of maps. When it comes to maps it has to be simple and comprehensive. Adding maps to a website is not very hard but making them interactive, lightweight and mobile-friendly is kinda difficult. That’s when Leaflet.Js comes to the rescue. So what is this Leaflet thing and why is it so special? Let me explain.
我正在一个需要很多地图的新项目中。 当涉及到地图时,它必须简单而全面。 将地图添加到网站并不难,但要使其具有交互性,轻巧性和移动友好性,则有点困难。 那就是Leaflet.Js进行救援的时候。 那么,Leaflet的功能是什么?为什么如此特别? 让我解释。
Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. Weighing just about 38 KB of JS, it has all the mapping features most developers ever need.
Leaflet是领先的开源JavaScript库,用于移动友好的交互式地图。 它仅重约38 KB的JS,具有大多数开发人员所需的所有映射功能。
In addition, Leaflet is designed with simplicity, performance, and usability in mind. It works efficiently across all major desktop and mobile platforms, can be extended with lots of plugins, has a beautiful, easy to use and well-documented API.
此外,单张设计与简单性,性能和可用性的初衷。 它可以在所有主要的台式机和移动平台上高效运行,可以通过许多插件进行扩展,并具有美观,易于使用和文档完善的API 。
When it comes to leaflet plugins, It’s so easy to use and very reliable. I used a few plugins already. Scale factor, fullscreen, easybutton, zoom are few of them. It made my work easier. Here’s an example map with markers, popups.
当涉及传单插件时,它是如此易于使用且非常可靠。 我已经使用了一些插件。 比例因子,全屏,快捷按钮,缩放比例很少。 它使我的工作更加轻松。 这是带有标记,弹出窗口的示例地图。
![Image for post](https://i-blog.csdnimg.cn/blog_migrate/dd33c46b86405448bc44d3dbc3e1f118.png)
It’s easy to create a map using Leaflet, Here’s the code for the above map.
使用Leaflet创建地图很容易,这是上面地图的代码。
Now all you have to do is create a div element with an id named map.
现在,您要做的就是创建一个ID为map的div元素。
<div id='map'></div>
Just like this.
<div id='map'></div>
就像这样。
It’s that easy! I hope you learned something about this map plugin and make sure to go through the documentation before using this. See you in the next one. Peace! ✌️
就这么简单! 我希望您了解了有关此地图插件的知识,并确保在使用前先阅读文档 。 下一个见。 和平! ✌️
js input上传单文件