Layouts - Ordering objects back to front

2,841 views
Skip to first unread message

David Reid

unread,
Jun 2, 2008, 4:28:48 PM6/2/08
to mapi...@googlegroups.com
Greetings All,
 
This may be feature a later version of MI has added, however, I'm still with MI 6.5
 
Is there any Mapbasic code or MBX already built that would allow me to order the selected object or objects, "back one" "Forward one" etc as opposed to "Bring to front" "Send to back"?
 
I'm looking for the ability to "step" a selected object one "layer" at a time, forward or backword in the layout window.
 
 
Thanks in advance
David Reid

Albert Tabino

unread,
Jun 2, 2008, 9:38:41 PM6/2/08
to MapInfo-L

David,

ouch!
manipulating layout objects is a lot of work(for me, it was - in the
past..i don't do that anymore...)....if you are trying to manipulate
contents of the layout, it might be easier manipulating map windows
inserted in the layout. You can easily manipulate contents of the map
window rather than contents in the layout...

please give us more detail or example on what you are trying to
do...the group might have some stuff already set up or might be able
to give you an idea of a better approach to your intent...

Thanks,

Albert Tabino

David Reid

unread,
Jun 3, 2008, 12:16:10 AM6/3/08
to mapi...@googlegroups.com
Thanks Albert, yeah, I could have been a little more descriptive.

When I say re-ordering objects, I'm referring to all layout objects in
general... For instance.

A layout which has one frame containing a traditional map window. (layer 1
we'll call it)
Then I have a custom map legend (map window) for particular themed maps,
that's opened in it's own frame in the layout, we'll call that layer 2...

Then we add a scale bar, layer 3... Some type of text, may have a map title,
legal disclaimer whatever and under that text I might draw a region or
rectangle box as a border and to cover the underlying map so the text can be
more clearly read.

I have found that sometimes if you say, move the mapper frame, it takes over
say a "border box" but not the text the border box enhances.

So you end up with the drawn "border box" on the bottom, the mapper frame,
then a text object.

"Sent to back" is great, but sometimes, one may only need to send the
selected object "whatever it is" "back" only one step, not all the way to
the back.

Hope this helps clearify.

Dave

Albert Tabino

unread,
Jun 4, 2008, 12:10:27 AM6/4/08
to MapInfo-L

ok...
you're saying "sometimes...(this happens)" and i believe you...

the way i contolled order of layout elements was:
- dump/discard the entire layout
- create a new layout by calling a layout template(workspace format)
that has the proper order of the all the elements needed. You can
format, order and position all elements this way by assigning
variables if you are doing this programatically.

This technique has been used in one of our fastest MB mapping routines
which makes:
-15 different themes/maps printed out in approx. 5-10 mins.;
- same scale;
- different legends;
- etc.

I posted a document DRAFTv2.doc this morning in the FILES section of
this page....
and the routine is called MdlMap.mbx

Other than the above...I'm not sure how easy it would be trying to
manipulate the layout elements directly...i tried that path but got
frustrated...anyway let us know how would you proceed with your
intent.

hope this helps,
> > David Reid- Hide quoted text -
>
> - Show quoted text -

geomatics.ch

unread,
Jun 4, 2008, 12:07:14 PM6/4/08
to MapInfo-L
Hi David,
If it's a one-time layout you're working with, I've also encountered
the same proplem and the only way I found was to select (CTRL+select
can selects objects that have "disappeared" underneath) and reorder
every single objet from the bottom up:

1. Bring to front layer 1 (map)
2. Bring to front layer 2 (legend)
3. Bring to front layer 3 (white rectangle mask)
4. Bring to front layer 4 (scalebar)
etc.

If you happen to move something on say, layer 3 like the white
rectangle this will cover layer 4 or anything else above it, (and
since "move back one" does not exist), you will need to only act on:
1. Bring to front layer 3
2. Bring to front layer 4
etc.


A much more efficient way of dealing with layouts I've found is to
decide once and for all of a "basic" layout template, with the order
of the frames working.
I have layouts for A4_portrait, A4_landscape, A3_portrait etc all
saved and ready to use at all times.
The other advantage is that your output is consistent. Most of my
clients use this method, and this ensures that no matter who's
printing out maps in the department, they will all have the same
layout. If the department name or the logo changes, this will need to
be done on one file only.

Here's the idea:

A. CREATING TEMPLATES (One-time job)
Create all the "constants", logo.tab, department_name.tab,
disclaimer.tab and place in one folder
Open each "constant" in a separate map window (you may want to create
these tab files using the official fonts)
Minimize all map windows

-Open just one geographic table, ie, streets.tab
-Launch one thematic just to have a legend window
-You may want to rename your streets map window "MAP" instead of the
default "streets.tab....map" for easier handling afterwards

Create your layout
-Add frames for the logo, departement_name, disclaimer, map window,
legend (tip: use whole numbers for the frame sizes and xy positioning)
-Add rectangles for dropshadows, masks, etc
-Add text and write in anything you need like "Title", "06-06-2008",
"Scale:"
-Reorder the layout layers as you wish

-Close streets.tab !
-Save workspace as Layout_size_of_paper_orientation.wor
-Close all

B. USING TEMPLATES
Anytime you're working in MapInfo and wish to print
Save your workspace first
Open the Layout.wor "within" your current session/workspace (*this is
the trick)
Resize the map window with Jaques Paris' resizmap.mbx to make it match
the size of your "MAP" frame and choose a given scale
Activate your layout window
Double-clic on the MAP frame and choose your map window
Update all the other frames, titles, dates, etc
Print
Close all without saving (unless you're working on a particularly
difficult project, do not save the layout in your .workspace, this way
you will benefit from the always "up-to-date" layouts)

C.MODIFYING TEMPLATES
Open a Layout.wor
Make the necessary changes on the "constant tables" or frame elements
and save
The changes will be taken into account for all your next printing
projects


This may have been a long way to explain a workaround, but I thought
maybe others may benefit from the example in general.

Isabella

David Reid

unread,
Jun 4, 2008, 12:41:17 PM6/4/08
to mapi...@googlegroups.com
Thank you so much for the feedback Isabella. I too have created a number of
'templates' for various repeat projects I do. But I am often asked for
something that ends up not fitting my normal templates. Most recently I had
a project whereby I needed to print a 48"x48" map due to scale requested
and area covered. I was then asked if I could create 8 smaller 'personal
sized' copies of this map, 11"x11". As I had done the 48" split on 24" roll
paper, I simply created a second layout with the same paper size and reduced
the layout to fit 2x2 (2 groups wide, 2 tall)

This is when the "ordering" elements got to be a mess. As I moved each group
of elements around to fit the printable area, different elements of that
group would be "reordered" top to bottom.

Oh well, I can live with the "Send to back/front", just thought one of the
guru's may have created an mbx to "Move in steps".

Thanks,
David

-----Original Message-----
From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] On
Behalf Of geomatics.ch
Sent: Wednesday, June 04, 2008 11:07 AM
To: MapInfo-L
Subject: [MI-L] Re: Layouts - Ordering objects back to front

geomatics.ch

unread,
Jun 4, 2008, 2:24:24 PM6/4/08
to MapInfo-L
Hi David, ok now I know get why your project got complex... ;D
Maybe it's just one of those once-a-year-projects that are just very
time-consuming.
Reading your example though, I wonder if one could not print & resize
to pdf each individual (11''x11'') and then assemble the four (2x2)
elements with Adobe writer, or something along those lines.
Otherwise, I have tested in the past a tool made by GeoAS called
MapPlot that you can download and test for 30 days which allows you to
use "dynamic variables" and allows you to print "serial adjacent
plots"

http://www.geoas.de/index.htm

Take care,
Isabella
Reply all
Reply to author
Forward
0 new messages