Hi everyone!
I am working on Google Maps and I have successfully displayed it in my web page. We have 24 hours of GPS recorded data. It contains longitude and latitud., Now as the data changes along with time, I have to populate a marker on Google Map on every different time stamp.
My Logic:
I have Taken a <big>DIV </big> to Display Google Map in it, Two Text Boxes For Longitude and latitude respectively. one Java Script To Load Google Map in Div Script is as Follows
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="util.js"></script>
<script type="text/javascript">
var directionsDisplay;
var directionsService = new google.maps.DirectionsService();
function initialize() {
directionsDisplay = new google.maps.DirectionsRenderer();
var slong = document.getElementById('<%= txtLong.ClientID %>').value;
var sLati = document.getElementById('<%= txtLati.ClientID %>').value;
var slongSV = 0;
var myLatlng = new google.maps.LatLng(slong, sLati);
var myOptions = {
zoom: 16,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var marker = new google.maps.Marker
({
position: new google.maps.LatLng(slong, sLati),
map: map,
title: 'Click me'
});
So Above Code Work Fine :)
My Problem:
i have DIV in update Panel and i have taken a Timer in which ticks i m loading new Values in Text boxes BUT When Timer Ticks Update Panel Updates And Google Map Go invisible [ Reason no Default Values/ If Defaults Values Than it shows that Default Value].
Need Of Solution:
I want to display that Google Map without any flickers or Smooth like we have in Android phones Navigation app :P, and i should be able to set The coordinates from Server Side or Code Behind
Can Any one Help me on this Please