图像缩略图

zoharby/plot_google_map

版本2.0.0.1(12.6 KB) Zohar Bar-Yehuda
Plot a google map on the background of the current figure using the Static Google Maps API.

29.5K下载

Updated2020年4月22日

来自Github

在GitHub上查看许可证

编者注:This file was selected as MATLAB Central选择一周

plot_google_map.m使用Google Maps API在当前图的背景中绘制地图。
它假设当前图的坐标位于WGS84基准中,并使用转换代码将Google使用的坐标系中的图像转换和投射到WGS84坐标中。
地图的缩放水平自动确定以覆盖图的整个区域。此外,它可以选择在图中放大时自动删除地图,从而显示出更多的细节,随着一个放大。
以下代码生成屏幕截图:
plot_google_map('apiKey', '') % You only need to run this once, which will store the API key in a mat file for all future usages
lat = [48.8708 51.5188 41.9260 40.4312 52.523 37.982];
lon = [2.4131 -0.1300 12.4951 -3.6788 13.415 23.715];
情节(lon,lat,'.r',“ MarkerSize”,20)
plot_google_map('mapscale',1)

先决条件
由于更改了Google Maps计费模型,您现在必须设置自己的Google Maps API密钥并为您的项目启用计费。您将获得每月200美元的自动信用,这足以容纳100,000个静态地图电话,而无需实际收费。

注意,这个如果你佤邦也存在一些挑战nt to deploy your code, as your API key will need to be deployed with the code / as a mat file and hence may be exposed to users.

已知的问题:
1) Saving the map with an image/matrix overlay drawn on top of it (especially a semi-transparent one) can sometimes cause unexpected results (map not showing etc.). If you're encountering such problems, it's recommended to use the export_fig submission:
//www.tatmou.com/matlabcentral/fileexchange/23629-exportfig
似乎最有效的组合:
set(gcf,'renderer','zbuffer')
export_fig('out.jpg')

引用为

Zohar Bar-Yehuda(2022)。zoharby/plot_google_map(https://github.com/zoharby/plot_google_map),github。检索

MATLABRelease Compatibility
使用R2009B创建
Compatible with any release
平台兼容性
Windows 苹果系统 Linux
致谢

启发:get_google_map,,,,自动地图量表生成

启发:borders,,,,plot_opentreetMap,,,,GPS2Cart,,,,兰萨特,,,,Gitanes,,,,get_google_map,,,,jcdstatusplot,,,,视觉惯性进程

社区寻宝

在Matlab Central中找到宝藏,发现社区如何为您提供帮助!

Start Hunting!
要查看或报告此GitHub附加组件中的问题,请访问GitHub存储库
要查看或报告此GitHub附加组件中的问题,请访问GitHub存储库