Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I am facing issue with loading multiple list of coordinates from database.I am passing an array of coordinates to my repeater control and displaying in the map.I have like thousand list of coordinates to show but it only shows 60 coordinates.Where could i be wrong because when i load even 100 coordinates ,the map won't show at all but gets lost.

Here is my code
ASP.NET
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script>


    <script type="text/javascript">


        var map = null;
        var   markers = [
      <asp:Repeater ID="rptMarkers" runat="server">
          <ItemTemplate>
              {
                  "OutletName": '<%# Eval("Region") %>',
                  "lat": '<%# Eval("Latitude") %>',
                  "lng": '<%# Eval("Longitude") %>',
                  "Street": '<%# Eval("Town") %>'
              }
            </ItemTemplate>
            <SeparatorTemplate>
                ,
            </SeparatorTemplate>
        </asp:Repeater>
        ];
        function GetMap()
        {
            map = new VEMap('mapDiv');
            
            map.LoadMap();
            map.SetCenterAndZoom(new VELatLong(-1.2884889217200366, 37.06666700000005),6);
           
            for (var i = 0; i < markers.length; i++)
            {

                var data=markers[i];
                var pp=new VEShape(VEShapeType.Pushpin,new VELatLong(data.lat,data.lng));
                pp.SetTitle("Outlet"+i);
                pp.SetDescription(data.OutletName);
                map.AddShape(pp)
    
            }
        }
      
       
    </script>
</head>
<body onload="GetMap();">
    <div id='mapDiv' style="removed: relative; width: 1400px; margin-removed120px; height: 1000px;"></div>
</body>
Posted
Updated 19-Nov-14 22:04pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900