Googleマップでポリゴンの色を設定しようとしています..
<html>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script src="http://geoxml3.googlecode.com/svn/branches/polys/geoxml3.js"></script>
<script src="http://geoxml3.googlecode.com/svn/trunk/ProjectedOverlay.js"></script>
<script>
var x=new google.maps.LatLng(-34.397, 150.644);
var a=new google.maps.LatLng(12.9667,77.5667);
var b=new google.maps.LatLng(13.0839,80.2700);
var c=new google.maps.LatLng(11.9310,79.7852);
var lat_point=new google.maps.LatLng('76.96332200000001,10.991397,0 76.963318,10.991423,0 76.96339500000001,10.991436,0 76.96339999999999,10.991411,0 76.96332200000001,10.991397,0 ');
function initialize() {
var options = {
center: x,
zoom:4,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("canvas"), options);
var parser = new geoXML3.parser({map: map, processStyles: true});
parser.parse("sample.kml");
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","sample.kml",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
var fff=xmlDoc.getElementsByTagName("topo")[0];
y=fff.childNodes[0];
//alert(y.nodeValue);
//document.write(y.nodeValue);
var myTrip=[a,b,c,lat_point];
var flightPath=new google.maps.Polygon({
path:myTrip,
strokeColor:"#01700A",
strokeOpacity:0.8,
strokeWeight:2,
fillColor:"#01700A",
fillOpacity:0.4
});
flightPath.setMap(map);
}
$(document).ready(initialize);
</script>
<div id="canvas" style="width:500px; height:500px"></div>
<html>
最初の 3 つの緯度と経度のポイント ポリゴンの色が正常に設定されました。私は困っている
lat_point=new google.maps.LatLng('76.96332200000001,10.991397,0 76.963318,10.991423,0 76.96339500000001,10.991436,0 76.96339999999999,10.991411,0 76.96332200000001,10.991397,0 ');
それを解決する方法は?