Hi, i have this code which marker al positions storage in my database:

function load(x,y) {
                var map = new GMap2(document.getElementById("map"));
                var directionsPanel;
            var directions;
                if (GBrowserIsCompatible()) {
                        map.setCenter(new GLatLng(x[0],y[0]), 15);
                    map.addControl(new GLargeMapControl());
                    map.setMapType(G_SATELLITE_MAP);
                    map.addControl(new GMapTypeControl());
                        map.addControl(new GScaleControl());
                        var icon = new GIcon();
                        icon.iconSize = new GSize(36, 45);
                    icon.iconAnchor = new GPoint(25, 35);
                        icon.image="../imagenes/car_032.png";
                        var direcciones="from: "+x[0]+", "+y[0]+"";
                        for (i=1;i<x.length;i++){
                                direcciones+=" to: "+x[i]+", "+y[i]+"";
                        }
                    directionsPanel = document.getElementById("route");
                    directions = new GDirections(map, directionsPanel);
                    directions.load(direcciones);
                                for (i=0;i<x.length;i++){
                                var latlng =new GLatLng(x[i],y[i]) ;
                                //var polyline = new GPolyline([new 
GLatLng(x[i],y[i]), new
GLatLng(x[i+1],y[i+1])], "#0000dd", 6, 0.4);
                                map.addOverlay(new GMarker(latlng,icon));
                                //map.addOverlay(polyline);
                                }
                }
        }

Lat and long I storage in array x and y.
With this function shows me all points on the map and his career. As
could do to show only a few points on the map. For example the start,
the final and some intermediate.
I have also read about the use of files called kml. As these could
generate  kml.xml automatically starting and the database? That option
is better?
--~--~---------~--~----~------------~-------~--~----~
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