I m working on code
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Working_on_Gmap._Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title></title> <script src="http://maps.google.com/maps? file=api&v=2&key=ABQIAAAAJio6ZK_J2rOpiA1ww2gf5xQh46a0lU_6M8bX_50PGgVKeDyC1xTpOcMUcMvQXksK0F6t9P5jSDOjRw" type="text/javascript"> </script> </head> <body> <form id="form1" runat="server"> <div id="map" style="width: 500px; height: 600px"></div> <script type="text/javascript"> var map = new GMap(document.getElementById("map")); map.enableScrollWheelZoom(); map.setUIToDefault(); var temp1=["Kelkar Musium,Pune,Maharashtra","Katraj,Pune,Maharashtra","Shivajinagar,Pune,Maharashtra","Dhankawdi,Pune,Maharashtra"]; var address = ""; //map.centerAndZoom(new GPoint(-83.022206, 39.998264), 3); latlang of pune var geocoder = null; geocoder = new GClientGeocoder(); ShowAddress(temp1); function ShowAddress(temp1) { for (var i = 0; i< temp1.length; i++) { address = ""; var myHtml = ""; var j = 0; j = i address = temp1[i]; myHtml = "<b>" + address + "</b>"; alert(address); if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { alert(address + " not found"); } else { map.setCenter(point, 12); var baseIcon = new GIcon(); baseIcon.iconSize = new GSize(32, 32); baseIcon.iconAnchor = new GPoint(16, 32); baseIcon.infoWindowAnchor = new GPoint(16, 0); var home = new GIcon(baseIcon, "http:// maps.google.com/mapfiles/kml/pal2/icon10.png", null, "http:// maps.google.com/mapfiles/kml/pal2/icon10s.png"); var marker = new GMarker(point, home); marker.value = i; alert(address); GEvent.addListener(marker, "click", function() { var myHtml = "<b>" + address + "</ b><br/>"; map.openInfoWindowHtml(point, myHtml); }); map.addOverlay(marker); } } ); } } i = 0; } </script> </form> </body> </html> but when i m clicking on any of the marker on Gmap it is giving me the Last Address from the array of string that is "Dhankawdi,Pune,Maharashtra" why this is happening? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
