我想为以下点和线绘制静态谷歌地图图像。我无法使用这两行绘制路径。一次只能运行一个。积分工作正常。
<Points>
<Point title="2. Day: New York (New York, USA)" subtitle=" " arrival="" departure="" description="" lat="40.7687605058" long="-73.9982199669" portID="163"/>
<Point title="4. Day: Halifax (Nova Scotia, Kanada)" subtitle=" " arrival="" departure="" description="" lat="44.655916705" long="-63.577837944" portID="79"/>
<Point title="10. Day: Southampton (England)" subtitle=" " arrival="" departure="" description="" lat="50.9046160427" long="-1.42889857292" portID="358"/>
</Points>
<Lines>
<Line description="" vertices="44.6559,-63.5778;44.6557106445861,-63.57522010803223;44.65418424805001,-63.570756912231445;44.65155875202518,-63.56706619262695;44.64758975332886,-63.56217384338379;44.64209376829492,-63.556509017944336;44.63679473888902,-63.55249500309583;44.63164996221578,-63.55024337768555;44.627388431119655,-63.54940509831067;44.622867974705315,-63.54923343693372;44.61567320740953,-63.54873848031275;44.608585499987015,-63.54719352792017;44.60415728007794,-63.544921875;44.55475997175015,-63.51814270019531;44.51180077510985,-63.49495697300881;44.46613109099745,-63.47625732421875;44.44505579897742,-63.47419738769531;44.42518251695511,-63.47795105539262;44.38495767014999,-63.48893738351762;44.35527821160296,-63.511962890625;43.89182280425899,-64.12976078689098;43.50872101129684,-64.775390625;41.76502956160546,-67.81018070876598;41.22824901518529,-68.9227294921875;41.105156763729745,-69.23712160438299;41.004775422229464,-69.576416015625;40.89690577585998,-70.1806640625;40.75655057115648,-71.27508547157049;40.51954115033359,-73.72650146484375;40.50857873259441,-73.83087158203125;40.50673409041132,-73.8751373346895;40.51171103483292,-73.93798828125;40.52343847118699,-73.98088074289262;40.5518959259611,-74.01695251464844;40.57496959646555,-74.03084564488381;40.595706501568905,-74.03961181640625;40.620207045205625,-74.05059814453125;40.63948838798836,-74.0536880493164;40.650820092517755,-74.05145645141602;40.67129477169052,-74.04325676034205;40.6920928987952,-74.0313720703125;40.712815141208125,-74.02454567025416;40.75661990450192,-74.0119743347168;40.76221103250323,-74.0090560913086;40.76546905643093,-74.00653409975348;40.76806170936613,-74.00390625;40.769141861474246,-74.00168466585455;40.769491796481404,-73.99995803833008;40.7688,-73.9982"/>
<Line description="" vertices="44.655916705,-63.577837944;50.9046160427, -1.42889857292"/>
</Lines>
第一行:
https://maps.googleapis.com/maps/api/staticmap?center=40.7687605058,-73.9982199669&zoom=2&size=600x300&maptype=roadmap%20
&markers=color:blue%7C40.7687605058,-73.9982199669
&markers=color:blue%7C44.655916705,-63.577837944
&markers=color:blue%7C50.9046160427,-1.42889857292
&path=color:0x0000ff|weight:5|44.6559,-63.5778|44.6557106445861,-63.57522010803223|44.65418424805001,-63.570756912231445|44.65155875202518,-63.56706619262695|44.64758975332886,-63.56217384338379|44.64209376829492,-63.556509017944336|44.63679473888902,-63.55249500309583|44.63164996221578,-63.55024337768555|44.627388431119655,-63.54940509831067|44.622867974705315,-63.54923343693372|44.61567320740953,-63.54873848031275|44.608585499987015,-63.54719352792017|44.60415728007794,-63.544921875|44.55475997175015,-63.51814270019531|44.51180077510985,-63.49495697300881|44.46613109099745,-63.47625732421875|44.44505579897742,-63.47419738769531|44.42518251695511,-63.47795105539262|44.38495767014999,-63.48893738351762|44.35527821160296,-63.511962890625|43.89182280425899,-64.12976078689098|43.50872101129684,-64.775390625|41.76502956160546,-67.81018070876598|41.22824901518529,-68.9227294921875|41.105156763729745,-69.23712160438299|41.004775422229464,-69.576416015625|40.89690577585998,-70.1806640625|40.75655057115648,-71.27508547157049|40.51954115033359,-73.72650146484375|40.50857873259441,-73.83087158203125|40.50673409041132,-73.8751373346895|40.51171103483292,-73.93798828125|40.52343847118699,-73.98088074289262|40.5518959259611,-74.01695251464844|40.57496959646555,-74.03084564488381|40.595706501568905,-74.03961181640625|40.620207045205625,-74.05059814453125|40.63948838798836,-74.0536880493164|40.650820092517755,-74.05145645141602|40.67129477169052,-74.04325676034205|40.6920928987952,-74.0313720703125|40.712815141208125,-74.02454567025416|40.75661990450192,-74.0119743347168|40.76221103250323,-74.0090560913086|40.76546905643093,-74.00653409975348|40.76806170936613,-74.00390625|40.769141861474246,-74.00168466585455|40.769491796481404,-73.99995803833008|40.7688,-73.9982
&key=
第二行:
https://maps.googleapis.com/maps/api/staticmap?center=40.7687605058,-73.9982199669&zoom=2&size=600x300&maptype=roadmap%20
&markers=color:blue%7C40.7687605058,-73.9982199669
&markers=color:blue%7C44.655916705,-63.577837944
&markers=color:blue%7C50.9046160427,-1.42889857292
&path=color:0x0000ff|weight:5|44.655916705,-63.577837944|50.9046160427,-1.42889857292
&key=
我想在一个静态地图中使用这两行绘制路径。
提前致谢。
答案 0 :(得分:1)
你错过了路上的一点。请试试这个。
https://maps.googleapis.com/maps/api/staticmap?center=40.7687605058,-73.9982199669&zoom=2&size=600x300&maptype=roadmap%20&markers=color:blue%7C40.7687605058,-73.9982199669&markers=color:blue%7C44.655916705,-63.577837944&markers=color:blue%7C50.9046160427,-1.42889857292&path=color:0x0000ff|weight:5|40.7687605058,-73.9982199669|44.655916705,-63.577837944|50.9046160427,-1.42889857292&key=