Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想保存我在谷歌地图上绘制的坐标。
这是我的地图地址,我可以画线和距离。 关联
请给我一个提示,我怎样才能在任何文本框中保存这一行的坐标..?
您已经在变量中有标记,只需像这样循环它们:
var tempPosition, string=""; for (var i = vmarkers.length - 1; i >= 0; i--) { tempPosition = vmarkers[i].getPosition(); if(tempPosition) { string += "[" + tempPosition.lat() + "," + tempPosition.lng() + "]"; } }