Hello Everyone,
I am GIS student working on a custom application.  I am trying to automate a
geocoding task in MapBasic v4.5 and continually get the same error.  I can't
figure out what the problem is and have tried numerous things.  I am hoping
someone can give me a little insight here.  My code for the sub is below.
The error I receive is:

invalid window identifier:0, it occurs at the line highlighted below:

Sub GeocodeTest
        Dim fx, fy as float
        
        '*******************************
        '* Set for finding the address
        '*******************************
        Find Using BCrds(street)
        Find "2419 Marine Drive" Interactive

        '******************************
        '* If found, position the map.
        '******************************
        If (CommandInfo(CMD_INFO_FIND_RC) >=1) Then
                fx = CommandInfo(CMD_INFO_X)
                fy = CommandInfo(CMD_INFO_Y)
                Set Map Layer retailcomps_GC Editable On
                Insert Into retailcomps_GC (obj) Values(CreatePoint(fx,fy))
                Set Map
                        Window gnWinId
        --->    Center (fx, fy) <------
                        Zoom 1 Units "mi"
                AutoLabel Layer retailcomps_GC
        Else
                Note "Address not found."
        End If
End Sub

I am currently running MapInfo version 7.8.  Thanks in advance for any help!

Mike Mayer

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 16021

Reply via email to