Viktor:

>The Constants topic helped clarify three of my issues (#1, #2 and #3).
>
>Regarding my other issues, it appears to me that you're side stepping my
>question. I apologize if I'm giving the impression that I'm asking for
>someone to spoon feed me the code, because that's not the case. I'm making
>an honest attempt to figure out how to use Maptitude scripting language, I
>even managed to write a macro that initially did what I wanted, which is to
>display the map window limits.

I wanted to give you some pointers, but did not claim to give all the 
answers. As to issue #4, the number is the sequence number of the icon in 
buttons.bmp, starting with the first one in the first row and counting to 
the last one in the last row.

Looking at the Notes for WriteArray(), it says "Array elements that are not 
numeric or strings are ignored." Since the elements in array coords are 
complex variables, you need to change them to numbers or strings. One 
solution is below, which writes each coord complex variable as a decimal 
lon/lat comma-delimited pair:

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
         coords = GetScopeCorners(GetMapScope())

//write the map view lon/lat bounds to a text file
         ptr = OpenFile("c:\\temp\\testmap.txt", "W")
         for i = 1 to coords.length do
             WriteLine(ptr, r2s(coords[i].lon/1000000) + "," + 
r2s(coords[i].lat/1000000))
             end
         CloseFile(ptr)

         clickskip:
             on escape default
             on notfound default

         endItem

     Close do
         Return()
         endItem

endDbox



Peter

----------------------------------------------------------------
Peter Van Demark
Director of GIS Products and Training        Phone: 617-527-4700
Caliper Corporation                            Fax: 617-527-5113
1172 Beacon Street                     E-mail: [EMAIL PROTECTED]
Newton MA 02461-9926            Web site: http://www.caliper.com




------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EA3HyD/3MnJAA/79vVAA/C5grlB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Maptitude/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to