On Jun 8, 6:58 am, Didi <[email protected]> wrote:
> Thank you for this. But does this not actually mean that the function
> is not implemented by the API and it has to be programmed?

That is correct, draggable driving directions is not supported by the
API.
Developers have implemented similar functionality to that on Google
Maps (or at least functionality that is similar to the version on
Google Maps at the time).  You can search the group for examples.

  -- Larry

>
> On 8 Jun., 00:46, Grok Lobster <[email protected]> wrote:
>
>
>
> > I can't find the example, but here is the code...
>
> > <!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>
> >     <title>Untitled Page</title>
> > <script src="http://maps.google.co.uk/maps?file=api&v=2&key=";
> > type="text/javascript"></script>
> > <script type="text/javascript">
> > //<![CDATA[
>
> > var latitude = 41.491564;
> > var longitude = -110.262728;
> > var zoomlevel = 15;
>
> > var map = null;
> > var line = [];
> > var theroute = "";
> > var polyShape;
> > var lineColor = "#ff0000";
> > var opacity = .5;
> > var lineWeight = 4;
>
> > function loadMap()
> > {
> >         if (GBrowserIsCompatible())
> >         {
> >                 map = new GMap2(document.getElementById("GoogleMap"));
> >                 map.addControl(new GLargeMapControl());
> >                 map.addControl(new GMapTypeControl());
> >                 map.setCenter(new GLatLng(latitude, longitude), zoomlevel);
> >                 map.clearOverlays();
>
> >                 startLine();
> >         }
>
> > }
>
> > function startLine()
> > {
> >         theroute = new GPolyline(line, lineColor, lineWeight, opacity);
> >         startDrawing(theroute, function() { });
>
> > }
>
> > function startDrawing(poly, onUpdate)
> > {
> >         map.addOverlay(poly);
> >         poly.enableDrawing();
> >         poly.enableEditing({onEvent: "mouseover"});
> >         poly.disableEditing({onEvent: "mouseout"});
>
> >         GEvent.addListener(poly, "lineupdated", function()
> >         {
> >                 var pointsCount = poly.getVertexCount();
>
> >                 var pointLatLng;
>
> >                 for(i = 0; i < pointsCount; i++)
> >                 {
> >                         pointLatLng += poly.getVertex(i);
> >                 }
> >         });
>
> >         GEvent.addListener(poly, "endline", function()
> >         {
> >                 GEvent.bind(poly, "lineupdated", this, onUpdate);
>
> >                 var pointsCount = poly.getVertexCount();
>
> >                 var pointLatLng;
>
> >                 for(i = 0; i < pointsCount; i++)
> >                 {
> >                         pointLatLng += poly.getVertex(i);
> >                 }
>
> >                 GEvent.addListener(poly, "click", function(latlng, index)
> >                 {
> >                         // enable editing when clicking on a point
> >                         if (typeof index == "number")
> >                         {
> >                                 poly.enableDrawing();
> >                         }
> >                 });
> >         });
>
> > }
>
> > //]]>
> > </script>
>
> > </head>
> > <body onload="loadMap()" onunload="GUnload()">
>
> >         <div id="GoogleMap" style="width: 700px; height: 400px"></div>
>
> > </body>
> > </html>
>
> > On Jun 7, 3:11 pm, Didi <[email protected]> wrote:
>
> > > Dear all,
>
> > > On maps.google.com you can change/move a route using drop and drag.
> > > Is
> > > there anyway I have access to this function in the API?
>
> > > I saw an older discussion from last August regarding this and there
> > > was no update.
>
> > > Thank you,
>
> > > Didi- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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