我最近询问将Google地图另存为图片,这指示我使用google静态地图api,请参阅:Save current Google Map as image。
但是,我现在遇到的问题是我的地图包含太多标记,而我创建的静态地图网址对于浏览器来说太长了:
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.604918654000016&markers=size: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:C|-33.950216116,25.581719020000037&markers=size:mid|color:0xFF0000|label:C|-33.933032495,25.603185665999945&markers=size:mid|color:0xFF0000|label:C|-33.9482674,25.563609581000037&markers=size:mid|color:0xFF0000|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:C|-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|label:C|-33.909966234,25.61213563499996&markers=size:mid|color:0xFF0000|label:C|-33.969171935,25.554816915999936&markers=size:mid|color:0xFF0000|label:C|-33.957948005,25.555829625&markers=size:mid|color:0xFF0000|label:C|-33.910026469,25.61217207200002&markers=size:mid|color:0xFF0000|label:C|-33.93997277,25.605487017999962...&sensor=false&key= ...
我尝试了HTML2CANVAS脚本,但它没有正确渲染地图 - 它只显示标记而不显示地图背景。
是否有另一种方法可以将包含许多标记的复杂谷歌地图渲染为图像?