我通過谷歌地球api打開kmz文件時遇到問題。在asp.net中跨域打開kmz文件mvc
google.earth.fetchKml(ge, 'http://10.122.150.183:8008/test.kmz', checkForCoordinates);
但是,當我更改鏈接到另一個域文件(這是WCF服務):'https://10.122.150.183:4431/Uploads/1/test.kmz'
,文件確實在谷歌地球不開的時候我提供服務器的靜態鏈接到文件它工作正常。我試過另一種解決方案:從ASP.Net MVC控制器動態提供KMZ文件,返回:
return File(fileStream, "application/vnd.google-earth.kmz kmz", fileName);
,如果我嘗試從瀏覽器的地址欄中得到它它工作正常,但是當我提供鏈接到行動在fetchKml
方法中,動作甚至不吸氣。
關於如何從另一個域打開kmz文件的任何建議?