Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/466.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 谷歌地图显示KML数据_Javascript_Google Maps_Kml_Google Visualization_Google Maps Markers - Fatal编程技术网

Javascript 谷歌地图显示KML数据

Javascript 谷歌地图显示KML数据,javascript,google-maps,kml,google-visualization,google-maps-markers,Javascript,Google Maps,Kml,Google Visualization,Google Maps Markers,我有KML字符串,我想在谷歌地图上显示它。我没有文件,而是字符串。这是因为我在Fusion表中有我的KML数据,我需要做类似的事情: 我只有KML数据,没有坐标,所以我不确定如何显示它 我试过这个,但没用: var marker = new google.maps.Marker({ map: map, position: '<polygon>....</polygon>', icon: new google.maps.MarkerIma

我有KML字符串,我想在谷歌地图上显示它。我没有文件,而是字符串。这是因为我在Fusion表中有我的KML数据,我需要做类似的事情:

我只有KML数据,没有坐标,所以我不确定如何显示它

我试过这个,但没用:

var marker = new google.maps.Marker({
      map: map,
      position: '<polygon>....</polygon>',
      icon: new google.maps.MarkerImage('https://developers.google.com/fusiontables/docs/samples/images/fusion_tables-32.png')
 });
var marker=new google.maps.marker({
地图:地图,
位置:“…”,
图标:新的google.maps.MarkerImage('https://developers.google.com/fusiontables/docs/samples/images/fusion_tables-32.png')
});
非常感谢您的帮助

谢谢

看看这些

我遇到了这一行:

它回答了我的问题