New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legend icons for annotation layers are not always drawn #4641

Closed
szekerest opened this Issue Apr 29, 2013 · 13 comments

Comments

Projects
None yet
2 participants
@szekerest
Member

szekerest commented Apr 29, 2013

No description provided.

@ghost ghost assigned szekerest Apr 29, 2013

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Apr 29, 2013

Member

@szekerest please be more precise. Multiple labels are clearly not supported with annotation layers, and therefore label expressions neither. Annotation layers wil be going away very soon and are marked as deprecated, there's no reason to have expressions inside a label for annotation layers.

Member

tbonfort commented Apr 29, 2013

@szekerest please be more precise. Multiple labels are clearly not supported with annotation layers, and therefore label expressions neither. Annotation layers wil be going away very soon and are marked as deprecated, there's no reason to have expressions inside a label for annotation layers.

@szekerest

This comment has been minimized.

Show comment
Hide comment
@szekerest

szekerest Apr 29, 2013

Member

@tbonfort In case of MS_LAYER_ANNOTATION label->status may set to MS_OFF by the rendering code. Therefore the legend image "Az" is not drawn. The status should always set to MS_ON when drawing the legend icons.
We should think it over how we deprecate annotation layers without loosing many of the features behind.

Member

szekerest commented Apr 29, 2013

@tbonfort In case of MS_LAYER_ANNOTATION label->status may set to MS_OFF by the rendering code. Therefore the legend image "Az" is not drawn. The status should always set to MS_ON when drawing the legend icons.
We should think it over how we deprecate annotation layers without loosing many of the features behind.

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Apr 29, 2013

Member

Which features are left behind? To my knowledge, there are none.

Member

tbonfort commented Apr 29, 2013

Which features are left behind? To my knowledge, there are none.

@szekerest

This comment has been minimized.

Show comment
Hide comment
@szekerest

szekerest Apr 29, 2013

Member

For example rendering text legend icons for layers which contain annotations only.

Member

szekerest commented Apr 29, 2013

For example rendering text legend icons for layers which contain annotations only.

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Apr 29, 2013

Member

please post the layer definition when your annotation layer does not show up in the legend.

Member

tbonfort commented Apr 29, 2013

please post the layer definition when your annotation layer does not show up in the legend.

@szekerest

This comment has been minimized.

Show comment
Hide comment
@szekerest

szekerest Apr 29, 2013

Member

LAYER
CONNECTION "C:\IntraMaps\SampleData\Spatial\suburbs_bdry.TAB"
CONNECTIONTYPE OGR
LABELITEM "Suburb"
METADATA
"coordsys_name" "AGD66 / AMG zone 50"
END # METADATA
NAME "suburbs_bdry"
PROJECTION
"proj=utm"
"zone=50"
"south"
"ellps=aust_SA"
"towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29"
"units=m"
"no_defs"
END # PROJECTION
STATUS ON
TEMPLATE "query"
TILEITEM "location"
TYPE ANNOTATION
UNITS METERS
CLASS
NAME "Class (0)"
LABEL
EXPRESSION ('[Suburb]' = 'Munster')
FONT "arial"
SIZE 15
COLOR 255 0 0
OFFSET 0 0
POSITION CC
SHADOWSIZE 1 1
TYPE TRUETYPE
END # LABEL
STYLE
COLOR 255 255 255
OUTLINECOLOR 0 0 0
END # STYLE
TEMPLATE "query.html"
END # CLASS
END # LAYER

Member

szekerest commented Apr 29, 2013

LAYER
CONNECTION "C:\IntraMaps\SampleData\Spatial\suburbs_bdry.TAB"
CONNECTIONTYPE OGR
LABELITEM "Suburb"
METADATA
"coordsys_name" "AGD66 / AMG zone 50"
END # METADATA
NAME "suburbs_bdry"
PROJECTION
"proj=utm"
"zone=50"
"south"
"ellps=aust_SA"
"towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29"
"units=m"
"no_defs"
END # PROJECTION
STATUS ON
TEMPLATE "query"
TILEITEM "location"
TYPE ANNOTATION
UNITS METERS
CLASS
NAME "Class (0)"
LABEL
EXPRESSION ('[Suburb]' = 'Munster')
FONT "arial"
SIZE 15
COLOR 255 0 0
OFFSET 0 0
POSITION CC
SHADOWSIZE 1 1
TYPE TRUETYPE
END # LABEL
STYLE
COLOR 255 255 255
OUTLINECOLOR 0 0 0
END # STYLE
TEMPLATE "query.html"
END # CLASS
END # LAYER

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Apr 29, 2013

Member

Well, as I said, expressions inside an annotation layer are not supported. The ticket could be changed to " render 'Az' string in legend icon" when layer contains no styles or label styles.

Member

tbonfort commented Apr 29, 2013

Well, as I said, expressions inside an annotation layer are not supported. The ticket could be changed to " render 'Az' string in legend icon" when layer contains no styles or label styles.

@szekerest

This comment has been minimized.

Show comment
Hide comment
@szekerest

szekerest Apr 29, 2013

Member

The title you mention would apply for another ticket as it would provide a new feature. I just wanted to fix a problem which have been working before the label->status thing was introduced.
We may probably rename the issue as "Legend icons for annotation layers are not always drawn". This also applies to mapscript when calling drawLegendIcon for the layer having label expressions.

Member

szekerest commented Apr 29, 2013

The title you mention would apply for another ticket as it would provide a new feature. I just wanted to fix a problem which have been working before the label->status thing was introduced.
We may probably rename the issue as "Legend icons for annotation layers are not always drawn". This also applies to mapscript when calling drawLegendIcon for the layer having label expressions.

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Apr 29, 2013

Member

label->status is not used in maplegend.c, so the problem is probably elsewhere

Member

tbonfort commented Apr 29, 2013

label->status is not used in maplegend.c, so the problem is probably elsewhere

@szekerest

This comment has been minimized.

Show comment
Hide comment
@szekerest

szekerest Apr 29, 2013

Member

Fix committed. I think the problem is less than we made such amount of efforts for it.

Member

szekerest commented Apr 29, 2013

Fix committed. I think the problem is less than we made such amount of efforts for it.

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Apr 29, 2013

Member

So instead of adding the same functionality to point layers that have no markers defined , you/we now have a reason to fight against the deprecation of annotation layers, that I have the pleasure to keep maintaining ...

Member

tbonfort commented Apr 29, 2013

So instead of adding the same functionality to point layers that have no markers defined , you/we now have a reason to fight against the deprecation of annotation layers, that I have the pleasure to keep maintaining ...

@szekerest

This comment has been minimized.

Show comment
Hide comment
@szekerest

szekerest Apr 29, 2013

Member

Adding the new option you mentioned would require more consideration and testing. Now I just wanted to fix an issue a client has reported. Later I'll probably find some more time to provide a more sophisticated solution.

Member

szekerest commented Apr 29, 2013

Adding the new option you mentioned would require more consideration and testing. Now I just wanted to fix an issue a client has reported. Later I'll probably find some more time to provide a more sophisticated solution.

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Jul 23, 2013

Member

fixed for annotation layers in 6.4 by tamas, and implemented for point layers with no symbols in the rfc98 branch for 7.0 (#4673) . c.f. tbonfort/msautotest@0594325 tbonfort/msautotest@918e6b6

Member

tbonfort commented Jul 23, 2013

fixed for annotation layers in 6.4 by tamas, and implemented for point layers with no symbols in the rfc98 branch for 7.0 (#4673) . c.f. tbonfort/msautotest@0594325 tbonfort/msautotest@918e6b6

@tbonfort tbonfort closed this Jul 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment