Re: [OpenMap Users] Labeling Shape Layer..

From: JR Andreassen <>
Date: Tue, 03 Oct 2006 11:08:11 -0500

Hi Stephane.
Thanks for the info, that helped.

Next I was going to add a label to the shape layer.
I found the spot to add it.
By adding a property (Label attribute) it would do it.
Has anyone done any work on this ???

> Hi JR !
> I don't know much about shapeFiles in openMap for the moment, but I
> may help you for OMTextLabelers :
> You can use a DeclutterMatrix. If you have an OMGraphicHandlerLayer,
> here is what you could do in your "prepare()" method :
> Projection projection = getProjection();
> declutterMatrix.setWidth(projection.getWidth());
> declutterMatrix.setHeight(projection.getHeight());
> declutterMatrix.create();
> Then, you can change all the OMTextLabeler's positions in the prepared
> graphics list using the declutterMatrix. This is a little tricky
> because you must tell the declutterMatrix which positions and sizes
> the labelers occupies in the matrix.
> I advise you to use the code given in the "declutterLabel" method of
> the "Location" class.
> And don't forget to use a declutter limit (last parameter of
> DeclutterMatrix.setNextOpen()) or else you could get your labels very
> far away from their original positions...
> In fact, all these things are already handled in the LocationLayer,
> using Location objects instead of OMTextLabelers... You should have a
> look at it, maybe it is sufficient for your needs.
> But beware of multiple lines labelers : I found an issue in
> "declutterLabel" when using multiple lines labelers (it should be in
> the archives) ...
> Also note that decluttering is a slow process.
> I think I will try to build a kind of "DeclutterLayer" in a few month,
> in order to have the labels decluttered in a separate layer (=> in a
> separate worker thread) and let this layer always be on top of other
> layers... I'll send it to this list as soon as it will work !
> Hope this helps !
> Regards,
> Stephane
> Le 17:02 28/09/2006, vous avez crit:
>> Hi Folks...
>> I've gone through the List archive looking for the way to Label Shape
>> files.
>> I found quite a few references to people looking for it.
>> Though, no permanent solution.
>> Has anyone done this ?? I'd prefer not to duplicate effort, but I'll
>> do it and share it if there is not something out there.
>> Also, on that note.
>> Has there been any work done on the OMTextLabler to prevent cluttering ?
>> It get's very bussy with City street names when you zoom out.
>> Any thoughts on approach ?
>> Thanks
>> JR
>> --
>> [To unsubscribe to this list send an email to ""
>> with the following text in the BODY of the message "unsubscribe
>> openmap-users"]

[To unsubscribe to this list send an email to ""
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Oct 03 2006 - 12:08:54 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT