Hi,
I have a problem where i have to take the address from a particular
asp control and use the same to get my latitude and longitude to
locate a particular point on the map.
I tried getting the value using getelementbyid and it does not work.

I have pasted my code below:
<script language="javascript" type="text/javascript">
var address=document.getElementbyID("lblAddress").innerText;
function initialize()
{
     var map = new google.maps.Map2(document.getElementById
("map"));
    geocoder = new google.maps.ClientGeocoder();

    if (geocoder)
    {
        geocoder.getLatLng(
        address,
        function(point) {
        if (!point)
        {
            alert(address + " not found");
        }
        else
        {
            map.setCenter(point, 13);
            var marker = new google.maps.Marker(point);
            map.addOverlay(marker);
            marker.openInfoWindowHtml(address);
        }
        }
        );
    }
</script>

I call the setonloadcallback method in the same aspx page somewhere
after the label has been placed.
<script language="javascript" type="text/javascript">

 google.setOnLoadCallback(initialize);
</script>


I am not able to get the address from the label control.. on using a
alert over the same it gives me the value "undefined". The value of
the label changes everytime.
Thanks in advance. Please help me out.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to