thanks all.

i'll look into all suggestions and get back to you if i make a significant
breakthrough.

just to clear things up a little, none of what's done needs to be preserved
in a werkspace or anything.  the base maps are already there, i have one
layer which is a user table which is generated dynamically based on what the
user is playing with on my VB (access) form.  they are created and displayed
extremely quickly, and it looks like i'm just going to have to create a
(hopefully speedy) subroutine which checks all labels in view to see how
crowded it is.

ash.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 21 December 2002 8:40 AM
To: Simmonds, Ashley (PTB)
Cc: 'Mapinfo List (E-mail)'
Subject: Re: MI-L moving overlapping labels programmatically

Ashley,

You can get information about displayed labels and change them including
their location.  To do so, you must identify the label you want to change.
The functionality is contained in the LabelInfo() function. The searching
for labels is done via LabelFindFirst, LabelFindNext and/or LabelFindByID.
Changing a label is done via the

Set Map (WindowId) Layer (number or name) Label Object (rowid)

command where you specify the properties you wish to change.

These changes may only be preserved in a workspace.

Determining whether labels overlap can be done via LabelInfo() by returning
a text object representation of the generated label and querying the MBR of
the text via ObjectGeography. However, if the label is rotated, you will
need to use the rotation angle (available from LabelInfo) to determine
where in the MBR the label text actually exists.

I hope this helps.

Eric Blasenheim
Software Architect
MapInfo Corporation


-----Original Message-----
From: ALICIA COX [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 21 December 2002 12:52 AM
To: [EMAIL PROTECTED]
Subject: Re: MI-L moving overlapping labels programmatically


If I am understanding you correctly
- same layer used in many map layouts?
- Small number of objects that require labels?
Suggestion 1:
Have you tried moving the centroid of the objects in question?  
Suggestion 2:
Otherwise, Yeah I believe that the easiest (if not what I mentioned as
Suggestion 1) would be manually labeling each time.
Suggestion 3:
More difficult but sometimes helpful, open workspace in a text editor, and
manually move the labels there. (but only good if you are very comfortable
in that method, and backups needed because messups Will occur).

Alicia Kaye Cox
DHS / CH&P / PMSS
535 W. Jefferson, 3rd Floor
Phone: 217 / 524 - 5987
Fax:      217 / 557 - 0515
[EMAIL PROTECTED]


-----Original Message-----
From: Quan, Sheila [mailto:[EMAIL PROTECTED]]
Sent: Friday, 20 December 2002 8:36 PM
To: Driver, Greg 9434; Simmonds, Ashley (PTB)
Subject: RE: MI-L moving overlapping labels programmatically
Importance: High


Hi guys

Evername has an evaluation copy of their software on their internet site.
Might be worthwhile checking it out. However, from past experience of the
two products the better one was definitely Label-EZ.  Only disadvantage is
that Label-EZ is quite expensive and the route that you will take probably
means that you won't buy the software outright.

In an ideal world, MapInfo would have a good text labelling tool similar to
the ones contained in GeoConcept and ArcView.

Here's hoping!

Sheila Quan
Steer Davies Gleave
28-32 Upper Ground, London SE1 9PD

> [direct] +44 (0)20 7919 8509
> [reception]  +44 (0)20 7919 8500
> [fax]  +44 (0)20 7827 9851
> [email] [EMAIL PROTECTED]
> 
www.steerdaviesgleave.com

This message is sent in confidence for the addressee only.  It may contain
legally privileged information.  The contents are not to be disclosed to
anyone other than the addressee.  Unauthorised recipients are requested to
preserve this confidentiality and to advise the sender immediately of any
error in transmission.


-----Original Message-----
From: Driver, Greg 9434 [mailto:[EMAIL PROTECTED]]
Sent: 20 December 2002 09:48
To: 'Simmonds, Ashley (PTB)'; 'Mapinfo List (E-mail)'
Subject: RE: MI-L moving overlapping labels programmatically


Ashley,

There are some MapInfo add-ons that will place labels automatically, but
you'll have to pay for them.  Check out Evername
http://www.evermap.com/evername.htm and Label-EZ at
http://www.maptext.com/capable.html.  I'm sure if you do write your own
program and make it available free on directionsmag you'll be one very
popular guy (not that you aren't already)!

Greg

> -----Original Message-----
> From: Simmonds, Ashley (PTB) [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, December 20, 2002 00:49
> To:   'Mapinfo List (E-mail)'
> Subject:      MI-L moving overlapping labels programmatically
> 
> hey people,
>  
> i know i've groaned about labels before, but before i spend some time
> looking into the subject any further, does anyone know if there's an easy
> way to:
>  
> 1.    detect whether labels are overlapping
> 2.    move labels programmatically.
>  
> the other option is that i could turn autolabelling off for a given layer,
> and assign labels to objects individually (there's only ever less than a
> dozen objects on this given layer).  my thought is that my program could
> check the locations of the objects and the current zoom level to figure
> out
> where the best position for a label would be.
>  
> if the latter is my best option, is it difficult and fiddly, or something
> which should be relatively easy to accomplish.
>  
> gramercy,
>  
> ash.
>  << File: ATT490530.txt >> 
> 
> 
Internet communications are not secure and therefore Surrey Police does not
accept legal responsibility for the contents of this message.  This email
and any attachments may be confidential. They may contain privileged
information and are intended for the named addressee (s) only. They must not
be distributed without our consent. If you are not the intended recipient,
please notify us immediately and delete the message and any attachments from
your computer, do not disclose, distribute, or retain this email or any part
of it. Unless expressly stated, opinions in this email are those of the
individual sender, and not of Surrey Police. We believe but do not warrant
that this e-mail and any attachments are virus free. You must therefore take
full responsibility for virus checking. Surrey Police reserves the right to
monitor all email communications through their networks.


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

Reply via email to