如何停止刷新谷歌地图?

时间:2013-08-07 08:00:39

标签: c# asp.net subgurim-maps

aspx :code:    
        <asp:Timer ID="Timer1" runat="server" OnTick="Timer1_Tick">
        </asp:Timer>
        <div id="map">
        <cc1:GMap ID="GMap1" runat="server" />
        </div>            
    C# cod:    
    protected void Timer1_Tick(object sender, EventArgs e)
    {
     GMap1.resetMarkers(); 
     Subgurim.Controles.GLatLng gLatLng = new  Subgurim.Controles.GLatLng(Convert.ToDouble(status.Rows[0][0]), Convert.ToDouble(status.Rows[0][1]));
     GMap1.setCenter(gLatLng, 16, Subgurim.Controles.GMapType.GTypes.Normal);
     Subgurim.Controles.GMarker oMarker = new Subgurim.Controles.GMarker(gLatLng);
     GMap1.addGMarker(oMarker);
  }                

每40秒GMap在这里变得清爽。我想要没有GMap刷新我在GMap上设置了新的lat和lang。如何在Gmap上设置这些新点或标记

2 个答案:

答案 0 :(得分:1)

断开计算机与互联网的连接

对不起伙伴,不得不这样做:D:D:D

答案 1 :(得分:0)

// Enable the visual refresh
google.maps.visualRefresh = true;

var map;
function initialize() {
  var mapOptions = {
    zoom: 8,
    center: new google.maps.LatLng(-34.397, 150.644),
    mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  map = new google.maps.Map(document.getElementById('map-canvas'),
      mapOptions);
}

google.maps.event.addDomListener(window, 'load', initialize);