我正在加载 ESRI 地图和 KML 图层,一切正常!
问题: KML 数据更改(经常更改)后,我无法在地图中显示新更改。我每次都需要强制清除浏览器缓存。我尝试刷新图层没有成功。
我的代码
// Create a new KmlLayer object.
ESRI.ArcGIS.Client.Toolkit.DataSources.KmlLayer theKmlLayer = new ESRI.ArcGIS.Client.Toolkit.DataSources.KmlLayer();
// Set the KmlLayer's ID.
theKmlLayer.ID = "SampleData";
// Set the Url of the KmlLayer. Note the Url takes a Uri object!
theKmlLayer.Url = new Uri("localhost/KML/east.kml");//Here is the New KML Data
// Need to use a ProxyUrl on the KmlLayer since the service is not hosted locally or on a local network.
theKmlLayer.ProxyUrl = "http://serverapps.esri.com/SilverlightDemos/ProxyPage/proxy.ashx";
// Add the KmlLayer to the Map. An automaic refresh of the Map and Legend Controls will occur.
Map1.Layers.Add(theKmlLayer);
我尝试了 KmlLayer.Refresh();
我需要通过代码清除浏览器缓存还是可以加载新数据?