Okay now I'm playing around with the WriteArray() and SaveArray() commands and I can't seem to get maptitude to write my coordinates to a file.

The script I'm using is as follows:

dBox "mapextents" title: "Map Extents" toolbox

        Tool 1, .5 Icons:"bmp\\buttons.bmp|131", "bmp\\buttons.bmp|165",
                        "bmp\\buttons.bmp|196" cursor: "Crosshair" do

        on escape goto clickskip            
         on notfound goto clickskip          

//capture map views lon/lat bounds
        scp=GetMapScope()                                        //normally commented out
        coords = GetScopeCorners(scp)                        //normally commented out
        //ShowArray(GetScopeCorners(GetMapScope()))          //simplified version of the above commands; to display map bounds.
                                                                //commented out to try to understand how the writearray() and savearray() commands work

//trying to write the map view lon/lat bounds to a text file
        ptr = OpenFile("testmap.txt", "W")
        WriteArray(ptr, coords)
        CloseFile(ptr)
        SaveArray(coords, "testmap.txt")

        clickskip:
                        on escape default
                        on notfound default
            endItem

        Close do
                        Return()
                endItem

endDbox

This script does create a text file in the Maptitude root directory called "testmap.txt" but whatever is written is all jibberish (      �˜š�� q �˜š��CŽ �����CŽ ����� q).  I guess my questions are:

1. The obvious, what am I doing wrong?

2. How do I specify the directory I would like my text file created in? I tried:        

        OpenFile("c:\testmap.txt", "W")

but then no text file would be created at all.

3. How would I use an Icon (Bitmap) I created instead of using Maptitudes Icons? I've tried

        Tool 1, .5 Icons:"c:\mybitmap\button1.bmp", "c:\mybitmap\button2.bmp",
                        "c:\mybitmap\button3.bmp" cursor: "MyIcon" do

4. Finally, how does maptitude find the Icon to use from the Buttons.bmp file? Is Maptitude somehow counting 131 icons from left to right? very confusing to me.

Thanks in advance for any assistance anyone can provide.


Viktor Keenan de la Hoz - Senior GIS Technician
City of Phoenix - Street Transportation Department
Design and Construction Management Division

Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to