Results 1 to 5 of 5

Thread: MapMonkey and Delphi Example

  1. #1
    FLAC ukchris's Avatar
    Join Date
    Nov 2003
    Location
    Massachusetts
    Posts
    1,458

    MapMonkey and Delphi Example

    Can anyone send me an example in D6 working with MM? I've been through the threads here, had it working at one point then it stopped completely. Ideally I'd like an example that displays the latitude/longitude and/or directions but anything would be a plus right now.

    Chris.

  2. #2
    My Village Called 0l33l's Avatar
    Join Date
    Jul 2004
    Location
    Berkeley, CA
    Posts
    10,516
    Using the dll or winsock

    Let me find em on my HD.

  3. #3
    My Village Called 0l33l's Avatar
    Join Date
    Jul 2004
    Location
    Berkeley, CA
    Posts
    10,516
    Code:
      if frmCommandAndControl.MM.IsMapMonkeyRunning = True then begin
      if frmCommandAndControl.MM.Connected = False then ConnectToMM;
      frmCommandAndControl.MM.ShowRoute;
    
    procedure ConnectToMM();
    var
      Word: WordBool;
      t: TOleEnum;
    begin
      word := True;
      frmCommandAndControl.MM.Connected := word;
      t := ThreadSync;
      frmCommandAndControl.MM.ThreadMode := t;
    end;

  4. #4
    FLAC ukchris's Avatar
    Join Date
    Nov 2003
    Location
    Massachusetts
    Posts
    1,458
    Using the DLL, hopefully. I'll try this later, thanks!

  5. #5
    FLAC ukchris's Avatar
    Join Date
    Nov 2003
    Location
    Massachusetts
    Posts
    1,458
    Okay so I have this:

    Code:
    procedure ConnectToMM();
    var
      Word: WordBool;
      t: TOleEnum;
    begin
      word := True;
      Form1.MM.Connected := word;
      t := ThreadSync;
      Form1.MM.ThreadMode := t;
    end;
    
    
    procedure TForm1.Timer1Timer(Sender: TObject);
    var
      Word: WordBool;
    begin
            if Form1.MM.Connected = False then ConnectToMM;
            if mm.IsMapMonkeyRunning = true then
                    Begin
                    if Form1.MM.Connected = False then ConnectToMM;
                    label1.caption := 'connected';
                    If mm.connected then label2.caption := 'xx';
                    If mm.connected then label3.caption := mm.Version;
                    End
            else
                    Begin
                    label1.caption := 'not connected';
                    End;
    
    end;
    I see label 1 show "Connected" but Label2 and Label3 never change, i.e. mm.connected is never true. Should I care? If I rey and access properties without it connected I get "not connected" errors.

    Thanks,

    Chris.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •