我有谷歌地图的HTML代码。我想将自定义位置添加到代码中,但我无法弄清楚如何。我做了一些研究,并添加了添加kml文件所需的自定义位置。我不知道该怎么做。有人能帮我吗?贝娄是我的地图代码
<!DOCTYPE html>
<html lang="en">
<head>
<title>Change Layer on Zoom in Google Fusion Tables</title>
<style>
#map_canvas { height: 550px; width: 825px; }
</style>
</head>
<body>
<input type="text" id="address" ></input><input onclick="geocode_address();" type="button" value="Zipcode"></input>
<div id="map_canvas"></div>
<script src="http://maps.google.com/maps/api/js?…
<script>
var map, countyTable, tractTable, ctyLayer;
var tractLayers = [];
var infowindow = new google.maps.InfoWindow({});
var geocoder = new google.maps.Geocoder();
function geocode_address() {
var address = document.getElementById('address').value…
geocoder.geocode( { 'address': address}, function(results, status) {
map.setCenter(results[0].geometry.locati…
map.setZoom(map.getZoom()+8);
});
}
function addClickHandler(FTLayer) {
google.maps.event.addListener(FTLayer, "click", function(event) {
infowindow.setOptions({pixelOffset:event…
content:event.infoWindowHtml,
position:event.latLng
});
infowindow.open(map);
});
}
map = new google.maps.Map(document.getElementById(… {
center: new google.maps.LatLng( 36.315125,-95.273437…
zoom: 4,
mapTypeId: "roadmap",
streetViewControl: false
});
</script>
</body>
</html>
这是kml示例代码:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
<name>Example</name>
<description><![CDATA[Location update]]></description>
<Style id="style1">
<IconStyle>
<Icon>
<href></href>
</Icon>
</IconStyle>
</Style>
<Style id="style3">
<IconStyle>
<Icon>
<href></href></href>http://maps.gstatic.com/mapfiles/ms2/micons/blue-dot.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="style2">
<IconStyle>
<Icon>
<href></href></href>http://maps.gstatic.com/mapfiles/ms2/micons/blue-dot.png</href>
</Icon>
</IconStyle>
</Style>
<Placemark>
<name>Chase</name>
<description><![CDATA[<div dir="ltr&quo
我一直想弄清楚怎么做才能帮到我?