我需要为谷歌地图的特定区域着色。我已经尝试过多边形叠加示例。. 这里使用的坐标如下:
var triangleCoords = [
new google.maps.LatLng(23.8099144,90.40607589999999,0),
new google.maps.LatLng(24.8199144,86.40607589999999,0),
new google.maps.LatLng(25.8299144,92.40607589999999,0),
new google.maps.LatLng(23.8099144,90.40607589999999,0)
];
但我有如下格式的区域坐标:
89.90277900000007,22.36819100000007,0 89.90277900000007,22.36833399999999,0 89.90334400000013,22.36861000000009,0 89.903611,22.36889000000003,0 89.90416700000004,22.36917099999998,0 89.90499900000009,22.37001000000014,0 89.90499900000009,22.37111000000006,0 89.905281,22.37138800000008,0 89.905281,22.37833300000009,0 89.90333500000007,22.37833300000009,0 89.90166400000005,22.37527899999996,0 89.901391,22.3750010000001,089.90166400000005,22.36944400000003,0 89.90166400000005,22.36929200000004,0 89.90166400000005,22.36916600000013,0 89.90110800000001,22.36861000000009,0 89.90132199999998,22.36829099999999,0 89.90135199999997,22.368179,0 89.901391,22.36805600000009,0 89.90277900000007,22.36805600000009,0 89.90277900000007 ,22.36819100000007,0
现在我如何在代码中使用这个区域坐标值。该值来自数据库单个字段,并且很难将其一一合并到对象中,例如:
new google.maps.LatLng(89.90277900000007,22.36819100000007,0),
new google.maps.LatLng(89.90277900000007,22.36833399999999,0),
.
.
.
new google.maps.LatLng(89.90277900000007,22.36819100000007,0),
请给我一个合适的解决方案。