Posts: 2
	Threads: 1
	Joined: Apr 2011
	
	
 
	
	
		AFAIK ViaMichelin is the only online mapping application which includes a Sightseeing route.
My aim it to get the ViaMichelin route into my TomTom GPS -overiding the TomTom default routing.
I have exported a route from Viamichlein in XVM format and imported it into Routeconverter. 
While Routeconverter displays the waypoints it doesn't display the Michelin route - Is there a workaround for this?
	
	
	
	
	
 
 
	
	
	
		
	Posts: 7,536
	Threads: 232
	Joined: Aug 2007
	
	
 
	
		
		
		08.04.2011, 11:22 
(This post was last modified: 08.04.2011, 11:23 by routeconverter.)
		
	 
	
		 (08.04.2011, 09:59)Pewit Wrote:  While Routeconverter displays the waypoints it doesn't display the Michelin route - Is there a workaround for this?
You can use the Type: selector and choose "Route" to have the waypoints connected by the Google Maps routing. Beware: this is just a visualization. The actual set of GPS positions doesn't change.
	
 
	
	
--
Christian
	
	
 
 
	
	
	
		
	Posts: 2
	Threads: 1
	Joined: Apr 2011
	
	
 
	
	
		You can use the Type: selector and choose "Route" to have the waypoints connected by the Google Maps routing. Beware: this is just a visualization. The actual set of GPS positions doesn't change.
[/quote]
Yes but the Google Maps routing doesn't include a sighseeing option and then when you transfer the route to the GPS with the original waypoints it will work out it's own routing again :-(
My ideal is to be able to have Routeconverter capture the route information from ViaMichelin (whch I presume must be in the XVM file) and then convert this into a series of waypoints which would then over-ride the GPS routing program.
There is an open source program that (I presume) did capture and convert ViaMichelin routes diect form their website but it hasn't been updates for some years and doesn't seem to work now. See 
http://vmrouteexporter.sourceforge.net/
Paul
	
 
	
	
	
	
 
 
	
	
	
		
	Posts: 7,536
	Threads: 232
	Joined: Aug 2007
	
	
 
	
	
		 (11.04.2011, 13:42)Pewit Wrote:  Yes but the Google Maps routing doesn't include a sighseeing option and then when you transfer the route to the GPS with the original waypoints it will work out it's own routing again :-(
Hi Paul,
that's how most navigation devices work. You have to set intermediate positions to force your navigation device to the route that Google Maps suggests. Alternatively you could try Positions/Insert Positions... and add turnpoints to your route before you export it to your navigation  device.
Whatever you do: always double check that your navigation device uses the route you've planned to avoid nasty reverse trips and dead ends.
 (11.04.2011, 13:42)Pewit Wrote:  My ideal is to be able to have Routeconverter capture the route information from ViaMichelin (whch I presume must be in the XVM file) and then convert this into a series of waypoints which would then over-ride the GPS routing program.
Try what I've described above: either manually or automatically.
 (11.04.2011, 13:42)Pewit Wrote:  There is an open source program that (I presume) did capture and convert ViaMichelin routes diect form their website but it hasn't been updates for some years and doesn't seem to work now. See http://vmrouteexporter.sourceforge.net/
It basically accesses the elements of the page to extract the position information. See Unit1.pas:
Quote:procedure TForm1.ExportToFile(Filename: String; FormatIndex: Integer);
var
  script: IHTMLElement;
  i, j, k, s1, s2: Integer;
  CoordinatesExists: Boolean;
  S: WideString;
  Coordinates, Location, Lat, Lon: WideString;
begin
  // Write file header specific to format
  case FormatIndex of
  // Garmin
    1:
    begin
      gps_data := '<?xml version="1.0" encoding="UTF-8"?><gpx xmlns:xsi=''http://www.w3.org/2001/XMLSchema-instance''';
      gps_data := gps_data + ' xsi:schemaLocation=''http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd'' creator=''ViaMichelin Route Exporter'' version=''1.1'' xmlns=''http://www.topografix.com/GPX/1/1''>';
      gps_data := gps_data + '<rte><name>' + Filename + '</name><number>1</number>';
    end;
  // ViaMichelin
    2: gps_data := '<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE poi_list SYSTEM "http://www2.viamichelin.com/vmw2/dtd/export.dtd"><poi_list version="2.0" folder=""><itinerary name="' + FileName + '">';
  // Comma Separated Values for MIO
    3: gps_data := '';
  end;
  // if there is html document presented
  if Assigned(WebBrowser.Document) then
  begin
    doc := WebBrowser.Document as IHTMLDocument3;   // assign html document
    script := (doc.getElementsByTagName('script') as IHTMLElementCollection).item(SCRIPT_NO, SCRIPT_NO) as IHTMLElement;   // assign content between javascript tags
    if Assigned(script) then
    begin
      S := script.innerHTML;   // get content inside tags in String format
      CoordinatesExists := False;
      repeat
        i := FindEitherStringPos('["C"', '["V"', S);   // find position of the string which indicates coordinates portion
        if (i > 0) then
          CoordinatesExists := True
        else
          break;
        S := RightStr(S, Length(S) - i - 5);
        s1 := 0;
        k := 0;
        Coordinates := '';
      // parsing coordinates and location information
        for j := 1 to Length(S) do
        begin
          if (S[j] = '"') then
          begin
            inc(k);
            if (k mod 2 = 1) then
              s1 := j
            else
            begin
              s2 := j;
              if (s2 <> s1 + 1) then
              begin
                if (Coordinates = '') then
                  Coordinates := MidStr(S, s1 + 1, s2 - s1 - 1)
                else
                begin
                  Location := MidStr(S, s1 + 1, s2 - s1 - 1);
                  break;
                end;
              end
              else
              begin
                if (k = 2) then
                  break;
              end;
            end;
          end;
          if (k = 15) then
            break;
        end;
        if (k <> 2) then
        begin
          Lon := LeftStr(Coordinates, AnsiPos('*', Coordinates) - 1);
          Lat := MidStr(Coordinates, AnsiPos('*', Coordinates) + 1, 99);
        // writing coordinates and location into specific format
          case FormatIndex of
            1: gps_data := gps_data + '<rtept lon="' + Lon + '" lat="' + Lat + '"><name>' + Location + '</name></rtept>';
            2: gps_data := gps_data + '<step name="' + Location + '" longitude="' + Lon + '" latitude="' + Lat + '"/>';
            3: gps_data := gps_data + Lon + ', ' + Lat + ', "' + Location + '"' + #10;
          end;
        end;
        //Memo1.Lines.Add(Location + ' - Longitude: ' + Lon + ' Latitude: ' + Lat);
      until i = 0;
      if not CoordinatesExists then
      begin
        Memo1.Lines.Text := 'No location information in the script tag! Wrong page or the page has changed!';
        exit;
      end;
    end
    else
    begin
      Memo1.Lines.Text := 'No script tags in document!';
      exit;
    end;
    // adding specific format ending
    case FormatIndex of
      1: gps_data := gps_data + '</rte></gpx>';
      2: gps_data := gps_data + '<description></description></itinerary></poi_list>';
    end;
    // temporary hack to replace one character unreadable for Mapsource
    gps_data := AnsiReplaceText(gps_data, #243, 'o');
    Memo1.Lines.Text := gps_data;
    Memo1.Lines.SaveToFile(FileName);
    //html := (WebBrowser.Document as IHTMLDocument2).body;
    //formid := (WebBrowser.Document as IHTMLDocument2).forms;
  end
  else
    Memo1.Lines.Text := 'Document not assigned! Probably no page in WebBrowser';
end;
Are you familiar with web technologies?
	
 
	
	
--
Christian