Reputation: 59
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);
}
for every 40 sec GMap getting refreshing here. i want without GMap refresh i set new lat and lang on GMap. how can i set this new points or markers on Gmap
Upvotes: 0
Views: 1430
Reputation: 1767
Disconnect your computer from the internet
Sorry mate, had to do it :D:D:D
Upvotes: 1
Reputation: 67
// 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);
Upvotes: 0