上代码:
<code>import gmplot #导入模块,安装不再赘述 latitude_list = [ 30.3358376, 30.307977, 30.3216419 ] # 纬度列表 longitude_list = [ 77.8701919, 78.048457, 78.0413095 ] #经度列表 gmap3 = gmplot.GoogleMapPlotter(30.3164945, 78.03219179999999, 13) #传入经度,纬度参数 gmap3.scatter( latitude_list, longitude_list, '# FF0000', size = 40, marker = False ) #传入经度,纬度的列表参数,绘图颜色,大小,标记 gmap3.plot(latitude_list, longitude_list, 'cornflowerblue', edge_width = 2.5) gmap3.draw( "C:\\Users\\user\\Desktop\\map13.html" ) #在html网页中打开显示出来 /<code>
输出结果:
尝试着更换一下经纬度的参数,感受一下界面的地图图形变化.
祝学习愉快!