someone? thanks!
Julio Santana On 26 fev, 15:30, Julio Santana <[email protected]> wrote: > Hello Guys, > > I'm trying to recover through the object GDirections, all routes > a route. > > In the group of version 2 of the api, I was informed that it would be > possible only through the object DirectionsRequest. > > Does anyone have an example of how to use this object for the purpose > described above. > > Below the test code that was using. > > Now thanks to all who can help. > > JulioSantana > > Olá Pessoal, > > Estou tentando recuperar através do objeto GDirections, todas as rotas > de um itinerário. > > No grupo da versão 2 da api, fui informado de que isso somente seria > possível através do objeto DirectionsRequest. > > Alguém tem um exemplo de como usar esse objeto para a finalidade > descrita acima. > > Abaixo o código de teste que estava usando. > > Desde já obrigado a todos que puderem ajudar. > > ============================================================================= > code test > > var map; > var directionsPanel; > var dirObj; > var summaryHTML; > var distance; > var duration; > var numRoutes; > var getNumEtapas; > > function initialize() { > map = new > GMap2(document.getElementById("map_canvas")); > directionsPanel = > document.getElementById("my_textual_div"); > > query = "from: rua ana neri, rio de janeiro to: rua > medina, méier, rio de janeiro"; > dirObj = new GDirections(map, directionsPanel); > dirObj.load(query); > > } > > function exibeDetalhesDoMapa(){ > > summaryHTML = dirObj.getSummaryHtml(); > distance = dirObj.getDistance().meters; > duration = dirObj.getDuration().seconds; > numRoutes = dirObj.getNumRoutes(); > getNumEtapas = > dirObj.getRoute(0).getNumSteps(); > var sumario = summaryHTML; > > alert("Sumário: "+sumario); > alert("Distância Total: "+distance); > alert("Duração Total: "+duration); > alert("Número de Rotas "+numRoutes); > alert("Número de Etapas da Rota: > "+getNumEtapas); > } -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
