1

我最近询问了将谷歌地图保存为图像的问题,这让我想到了使用谷歌静态地图 API,请参阅: 将当前谷歌地图保存为图像

但是,我现在遇到的问题是我的地图包含太多标记,并且我创建的静态地图 url 对于浏览器来说太长了:

http://maps.google.com/maps/api/staticmap?center=-33.942324329131765,25.552995870361304&size=950x780&zoom=14&maptype=roadmap&markers=size:mid|color:0xFF0000|label:C|-33.947032558,25.60&4918654 mid|color:0xFF0000|label:C|-33.963374232,25.555530886000042&markers=size:mid|color:0xFF0000|label:C|-33.947930201,25.55912291499999&markers=size:mid|color:0xFF0000|label:C|-33.946769292,25.599957524000046 &markers=size:mid|color:0xFF0000|label:C|-33.938220682,25.605319968000003&markers=size:mid|color:0xFF0000|label:C|-33.948348591,25.56376567799998&markers=size:mid|color:0xFF0000|label:: -33.950216116,25.581719020000037&markers=size:mid|color:0xFF0000|label:C|-33.933032495,25.603185665999945&markers=size:mid|color:0xFF0000|label:C|-33.94826810,25.94826810,25.94826810,25.94826630xFF0000|label:C|-33.938193028,25.60551151599998&markers=size:mid|color:0xFF0000|label:C|-33.933300929,25.603159268000013&markers=size:mid|color:0xFF0000|label:C|-33.968700158,25.55439900600004&markers=size: mid|color:0xFF0000|label:C|-33.968596131,25.554452008999988&markers=size:mid|color:0xFF0000|label:C|-33.934990907,25.60488814300004&markers=size:mid|color:0xFF0000|label:C|-33.934927983,25.604891037000016 &markers=size:mid|color:0xFF0000|label:C|-33.935197488,25.60385677599993&markers=size:mid|color:0xFF0000|label:C|-33.937367209,25.60520025200003&markers=size:mid|color:0xFF0000|label: -33.949374841,25.581271270000002&markers=size:mid|color:0xFF0000|label:C|-33.949337478,25.58134407800003&markers=size:mid|color:0xFF0000|label:C|-33.968608886,25.554294922000053&markers=size:mid|color:0xFF0000|标签:C|-33.909966234,25.61213563499996&markers=size:mid|color:0xFF0000|label:C|-33.969171935,25.554816915999936&markers=size:mid|color:0xFF0000|label:C|-33.9577948005,2555. 0xFF0000|label:C|-33.910026469,25.61217207200002&markers=size:mid|color:0xFF0000|label:C|-33.93997277,25.605487017999962...&sensor=false&key=...

我已经尝试过HTML2CANVAS脚本,但它没有正确呈现地图 - 它只显示标记而不显示地图背景。

是否有另一种方法可以将具有许多标记的复杂谷歌地图渲染为图像?

4

0 回答 0