Subscribe to this thread
Home - General / All posts - labels - issue with display
gm_pl2 post(s)
#03-Dec-18 11:15

Hello there,

I'm currently testing M9 viewer - 9.0.168.5 64-bit versions and having an issue once trying to label one of the layers (some records attached) using. No matter whethere I originally read it as shp, or converted to kml by M8 and imported to M9 viewer. There is no issue to label it neither with Manifold 8, Qgis.

Thank you in advance for help.

By the way: I'm impressed by the speed of 9 :)

Attachments:
manifold_forum_issue.zip

gm_pl2 post(s)
#03-Dec-18 12:45

just to add some extra comment. There is no issue to create 'label drawing' but I can't see any labels neither trying to display it as separate component, nor adding to 'Map' component.

Dimitri

5,119 post(s)
#03-Dec-18 13:06

having an issue once trying to label one of the layers

Not enough info. You have to tell us step by step what you are doing. Try this with a "known good" map,. That way, we're all on the same page.

1. Visit the downloads page for viewer and download the Mexico_queries.mxb. Open it and open the Map.

2. Using the procedure in the Labels topic (read that topic, right?) create labels for the Mexico provinces using the Name field and add them to the map.

Can you do that OK? If not, tell us what you did and where you had a problem.

Typical errors: Wildly wrong coordinate systems,ofen because the source data that was used was incorrectly imported, wrong coord system assigned, etc.

Sloots

437 post(s)
#04-Dec-18 09:50

Hi,

I did some testing with your map. There is nothing wrong with the projection. It's just M9 that only supports very basic labeling nowadays.

Your river has a lot of short line segments, and M9 "thinks" there is not enough space to write out the label. It needs a straight line I suppose, as I have never seen curved labels in M9 yet.

If I add a straight line in your drawing the label is visible. We have to wait a little before the will extend the labeling capabilities.

Kind regards,

Chris


http://www.mppng.nl/manifold/pointlabeler

Dimitri

5,119 post(s)
#04-Dec-18 12:11

There are two ways to deal with that (at least until the next build or two...), both of which are hacks:

1. Add a geometry field to the table that is a computed field, which generates the centroid for the line. I called the field Centroid and used the expression:

GeomMakePoint(GeomCenter([Geom, 0))

Next, create a drawing from the table using the Centroid field and create a label for that. The result is a point label at the centroid of the line, which often works out OK and has the merit of being horizontal and easily read.

2. Add a geometry field to the table that is a computed field, which generates a straight line from the first coordinate of the line to the last coordinate of the line. I called the field Segment and used the expression:

GeomMakeSegment(GeomCoordXY([Geom], 0), GeomCoordXY([Geom], GeomCoordCount([Geom])-1))

You can then create a drawing from the table using that Segment field, and make labels from that drawing. Since the lines will be roughly in the same orientation as the curvy line you get a tilted label.

Neither approach, of course, is as nice as a curvy label that follows a curved line. But... I use the first trick quite a bit since I like the legibility of horizontal labels. It can also be useful to create the centroid geoms using the transform panel, that is, not as computed geoms, so then you can drag around the labels as you like, for greater freedom and control.

Attachments:
river_label_01.jpg
river_label_02.jpg

Manifold User Community Use Agreement Copyright (C) 2007-2017 Manifold Software Limited. All rights reserved.