Me? Just answering a question. At
any rate, it wasn’t clear what behavior the original poster wanted, just the
behavior he didn’t want: The map full of nothing but symbols when
zoomed out too far.
Depending on what is actually desired, and
how much effort one is willing to put in, either Mats’ solution (multiple
layers with different zoom levels), my solution (layout), or Eric’s (text
objects) will work.
Hope this helps
Spencer
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Monday, June 12, 2006 6:06
PM
To: Spencer Simpson
Cc: 'Lee Morris';
mapinfo-l@lists.directionsmag.com; [EMAIL PROTECTED]
Subject: RE: [MI-L] Symbol Sizes
You can use text objects instead of symbols to emulate
the behavior you wish. You would need some MapBasic code to convert an
existing symbol layer.
Assumptions:
- The frontwindow() is a map
window
- tablename is the name of
the table with your current symbols.
- phonysymbols is the name
of a table to receive the text objects.
- The current symbols you
are using are font symbols, not the original vector symbols (Mapinfo 3.0
compatible) nor bitmap symbols. The font name from the original symbol is
going to be used in creating the text object.
- The size in points that
you pass into the create text function and the current zoom of the map
window are important. I used a value of 12. This would mean that my text
object (symbol) would want to be 12 point at the current zoom of the map.
Make sure you get this value right!
Here's some MapBasic code.
dim
sym as object
' set
the global styles used by CreateText() - the Font name is from the current
symbol fetched, the style is normal, the font size is 12, the color is black
and there is no background.
set
style font makefont(styleattr(objectinfo(tablename.obj, 2), 5), 0, 12, 0,
-1)
'
create the text object in the context of the frontwindow(), at the location of
the current symbol, getting the character for the font from the code of the
symbol, with no angle (horizontal), the anchor being the center (same as for
symbols) and no offset.
sym=createtext(frontwindow(),
centroidx(tablename.obj), centroidy(tablename.obj),
chr$(str$(styleattr(objectinfo(tablename.obj, 2), 1))), 0, 0, 0)
' insert the text object into the table.
insert
into phonysymbols(obj) values(sym)
If you
were loop through your symbol table, you could convert all the symbols to these
text objects.
Please
note that this is a workaround, as MapInfo will no longer regard these objects
as symbols but as text objects so some other behaviors may not be what you
want. However, you will get the visual scaling behavior that you want.
I
would be curious why you want this behavior. Anyway, I hope this helps.
Eric
Blasenheim
Principal
Software Architect
MapInfo
Corporation
Mail List:mapinfo-l-bounces
From:
|
"Spencer Simpson"
<[EMAIL PROTECTED]> on 06/12/2006 01:12 PM AST
|
To:
|
"'Lee Morris'" <[EMAIL PROTECTED]>,
<mapinfo-l@lists.directionsmag.com>
|
cc:
|
|
Subject:
|
LinkRE:
[MI-L] Symbol Sizes
|
There
is a (sort of) way of doing this: View your map in a Layout window.
Set the
Layout frame holding your map to display a particular scale, and do
all your panning and zooming on the layout.
You can create a custom page
size if the area to view is very large.
Don't pan or
zoom the underlying Map window, but if you need to edit data or
annotation, clone that window and set the clone to
show a "reference scale".
Pan around the clone (don't zoom in or out) and
edit objects in that window.
Hope this helps
Spencer
________________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
On Behalf Of Lee Morris
Sent: Friday, June 09, 2006 9:00 AM
To: mapinfo-l@lists.directionsmag.com
Subject: [MI-L] Symbol Sizes
I need help.
I’ve
tried everywhere else, can any of you guys help me?
Is there a
way of sizing symbols according to the scale of the map, as when
I zoom out, all I can see are symbols.
Please
help!!!
Thanks
Lee Morris
Mouchel
Parkman Services Ltd
Cunard Building
Water Street
Liverpool
L3 1ES
mailto:
[EMAIL PROTECTED]
Tel 0151 242 7777 x.358
Fax 0151 242 7704
The
information in this e-mail is confidential and intended to be solely for
the use of the addressee(s) and may contain
copyright and/or legally
privileged information. If you are not the
addressee (or responsible for
delivery of the message to the addressee) please
e-mail us at
[EMAIL PROTECTED] and delete the
message from your computer;
copying, distribution, use or disclosure of its
contents is strictly
prohibited.
As Internet communications are capable of data
corruption no responsibility
is accepted for changes made to this message after
it was sent. For this
reason it may be inappropriate to rely on advice
contained in any e-mail
without obtaining written confirmation of it.
In addition, no liability or responsibility is
accepted for viruses and it
is your responsibility to scan attachments (if
any).
Please note that for business purposes, outgoing
and incoming emails from
and to the company may be monitored and recorded.
Mouchel
Parkman Services Ltd, Registered in England at West Hall, Parvis
Road, West Byfleet, Surrey UK KT14 6EZ
Registered No : 1686040
_______________________________________________
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l