Click here to Skip to main content
15,878,814 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I would like to draw multiple polylines and which are not connected in proper way.
And i am using sql for providing coordinates.

pls help me out and i am new to javascript.
and i got some solution but here i dont know how to give coordinates dynamically.
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" 
xmlns:v="urn:schemas-microsoft-com:vml">
<head>
    <title>MW Links</title>
    <script src="http://maps.google.com/maps?file=api&v=2&key=AIzaSyBYxFY6xnsDcqqGJ4QAvMXx24Jj_t-c_Oc" type="text/javascript"></script>
    <script type="text/javascript">
        function loadEarth(mapdiv) {
            if (GBrowserIsCompatible()) {             
                var point;
                if (!mapdiv) return true;
                var map = new GMap2(document.getElementById("map"));
                map.addControl(new GOverviewMapControl());
                map.enableDoubleClickZoom();
                map.enableScrollWheelZoom();
                map.addControl(new GMapTypeControl());
                map.addControl(new GSmallMapControl());          
                map.setCenter(new GLatLng(37.4419, -122.1419), 16);
                map.setMapType(G_SATELLITE_MAP);                
                var polyline = new GPolyline([new GLatLng(37.4419, -122.1419),
              new GLatLng(37.4519, -122.1519)
              ], "#3333cc", 4);
            }
            map.addOverlay(polyline);
        }
    </script>    
</head>
 <body >
    <div id="map" style="width: 900px; height: 600px"></div>    
</body>
</html>
Posted
v3

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