Skip to content

Conversation

hnqoliveira
Copy link

#886
new ol.style.Icon({
url: 'http://127.0.0.1/console/img/officer.png',
opacity: 1,
width: 24,
height: 24,
label: new ol.style.Text({
color: '#000',
text: ol.expr.parse('i'),
fontFamily: 'Calibri,sans-serif',
fontSize: 10,
textBaseline: 'top'
}),
labelVAlign: 'bottom', //vertical align. not required [top|bottom]. default top
labelAlign: 'center' //horizontal align. not required [left|right|center]. default center
})

unknown and others added 2 commits August 13, 2013 13:11
Add three parameters at icon symbolizer. This parameters are the
label text, horizantal align and vertical align. The text will be
handled in the renderer to add a text label to image icon.
See openlayers#886.

The body of the commit message can be several paragraphs, and
please do proper word-wrap and keep columns shorter than about
74 characters or so. That way "git log" will show things
nicely even when it's indented.

Further paragraphs come after blank lines.
@ahocevar
Copy link
Member

#886 suggests adding more positioning options to labels for positioning relative to the label point, so I am surprised to see an implementation of a label property for point symbolizers here, with label positioning configured on the point symbolizer and not the text symbolizer. So what am I missing?

@tschaub
Copy link
Member

tschaub commented Oct 8, 2013

Composing a text symbolizer and an icon symbolizer should accomplish this (see #1106 and #1107 for alignment options).

@tschaub tschaub closed this Oct 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants