- Timestamp:
- 2017-07-13T23:02:13+02:00 (7 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r12456 r12476 582 582 Rectangle2D bounds = text.font.getStringBounds(s, frc); 583 583 584 double x = Math.round(p.getInViewX()) + text.xOffset + bounds.getCenterX();585 double y = Math.round(p.getInViewY()) + text.yOffset + bounds.getCenterY();584 double x = Math.round(p.getInViewX()) + bs.xOffset + bounds.getCenterX(); 585 double y = Math.round(p.getInViewY()) + bs.yOffset + bounds.getCenterY(); 586 586 /** 587 587 * … … 1096 1096 * Draws a text for the given primitive 1097 1097 * @param osm The primitive to draw the text for 1098 * @param text The text definition (font/position/.../text content) to draw. 1098 * @param text The text definition (font/position/.../text content) to draw 1099 * @param labelPositionStrategy The position of the text 1099 1100 * @since 11722 1100 1101 */ 1101 public void drawText(OsmPrimitive osm, TextLabel text ) {1102 public void drawText(OsmPrimitive osm, TextLabel text, PositionForAreaStrategy labelPositionStrategy) { 1102 1103 if (!isShowNames()) { 1103 1104 return; … … 1114 1115 forEachPolygon(osm, path -> { 1115 1116 //TODO: Ignore areas that are out of bounds. 1116 PositionForAreaStrategy position = text.getLabelPositionStrategy();1117 PositionForAreaStrategy position = labelPositionStrategy; 1117 1118 MapViewPositionAndRotation center = position.findLabelPlacement(path, nb); 1118 1119 if (center != null) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/BoxTextElement.java
r12332 r12476 4 4 import java.awt.Color; 5 5 import java.awt.Rectangle; 6 import java.awt.geom.Point2D; 6 7 import java.util.Objects; 7 8 … … 173 174 public TextLabel text; 174 175 /** 176 * The x offset of the text. 177 */ 178 public int xOffset; 179 /** 180 * The y offset of the text. In screen space (inverted to user space) 181 */ 182 public int yOffset; 183 /** 175 184 * The {@link HorizontalTextAlignment} for this text. 176 185 */ … … 187 196 * @param text The text to display 188 197 * @param boxProvider The box provider to use 198 * @param offsetX x offset, in screen space 199 * @param offsetY y offset, in screen space 189 200 * @param hAlign The {@link HorizontalTextAlignment} 190 201 * @param vAlign The {@link VerticalTextAlignment} 191 202 */ 192 203 public BoxTextElement(Cascade c, TextLabel text, BoxProvider boxProvider, 193 HorizontalTextAlignment hAlign, VerticalTextAlignment vAlign) {204 int offsetX, int offsetY, HorizontalTextAlignment hAlign, VerticalTextAlignment vAlign) { 194 205 super(c, 5f); 206 xOffset = offsetX; 207 yOffset = offsetY; 195 208 CheckParameterUtil.ensureParameterNotNull(text); 196 209 CheckParameterUtil.ensureParameterNotNull(hAlign); … … 250 263 vAlign = VerticalTextAlignment.BOTTOM; 251 264 } 252 253 return new BoxTextElement(c, text, boxProvider, hAlign, vAlign); 265 Point2D offset = TextLabel.getTextOffset(c); 266 267 return new BoxTextElement(c, text, boxProvider, (int) offset.getX(), (int) -offset.getY(), hAlign, vAlign); 254 268 } 255 269 … … 283 297 return hAlign == that.hAlign && 284 298 vAlign == that.vAlign && 299 xOffset == that.xOffset && 300 yOffset == that.yOffset && 285 301 Objects.equals(text, that.text) && 286 302 Objects.equals(boxProvider, that.boxProvider); … … 289 305 @Override 290 306 public int hashCode() { 291 return Objects.hash(super.hashCode(), text, boxProvider, hAlign, vAlign );307 return Objects.hash(super.hashCode(), text, boxProvider, hAlign, vAlign, xOffset, yOffset); 292 308 } 293 309 … … 295 311 public String toString() { 296 312 return "BoxTextElement{" + super.toString() + ' ' + text.toStringImpl() 297 + " box=" + getBox() + " hAlign=" + hAlign + " vAlign=" + vAlign + '}';313 + " box=" + getBox() + " hAlign=" + hAlign + " vAlign=" + vAlign + " xOffset=" + xOffset + " yOffset=" + yOffset + '}'; 298 314 } 299 315 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/TextElement.java
r11932 r12476 12 12 import org.openstreetmap.josm.gui.mappaint.Keyword; 13 13 import org.openstreetmap.josm.gui.mappaint.styleelement.placement.CompletelyInsideAreaStrategy; 14 import org.openstreetmap.josm.gui.mappaint.styleelement.placement.PositionForAreaStrategy; 14 15 15 16 /** … … 21 22 22 23 private final TextLabel text; 24 /** 25 * The position strategy for this text label. 26 */ 27 private final PositionForAreaStrategy labelPositionStrategy; 23 28 24 protected TextElement(Cascade c, TextLabel text) { 29 /** 30 * Create a new way/area text element definition 31 * @param c The cascade 32 * @param text The text 33 * @param labelPositionStrategy The position in the area. 34 */ 35 protected TextElement(Cascade c, TextLabel text, PositionForAreaStrategy labelPositionStrategy) { 25 36 super(c, 4.9f); 26 this.text = text; 37 this.text = Objects.requireNonNull(text, "text"); 38 this.labelPositionStrategy = Objects.requireNonNull(labelPositionStrategy, "labelPositionStrategy"); 39 } 40 41 /** 42 * Gets the strategy that defines where to place the label. 43 * @return The strategy. Never null. 44 * @since 12475 45 */ 46 public PositionForAreaStrategy getLabelPositionStrategy() { 47 return labelPositionStrategy; 27 48 } 28 49 … … 37 58 return null; 38 59 final Cascade c = env.mc.getCascade(env.layer); 39 return new TextElement(c, text); 60 61 Keyword positionKeyword = c.get(AreaElement.TEXT_POSITION, null, Keyword.class); 62 PositionForAreaStrategy position = PositionForAreaStrategy.forKeyword(positionKeyword); 63 position = position.withAddedOffset(TextLabel.getTextOffset(c)); 64 65 return new TextElement(c, text, position); 40 66 } 41 67 … … 58 84 return null; 59 85 } 60 return new TextElement(c, text .withPosition(CompletelyInsideAreaStrategy.INSTANCE));86 return new TextElement(c, text, CompletelyInsideAreaStrategy.INSTANCE); 61 87 } 62 88 … … 64 90 public void paintPrimitive(OsmPrimitive primitive, MapPaintSettings paintSettings, StyledMapRenderer painter, 65 91 boolean selected, boolean outermember, boolean member) { 66 painter.drawText(primitive, text );92 painter.drawText(primitive, text, getLabelPositionStrategy()); 67 93 } 68 94 … … 73 99 if (!super.equals(obj)) return false; 74 100 TextElement that = (TextElement) obj; 75 return Objects.equals(text, that.text); 101 return Objects.equals(labelPositionStrategy, that.labelPositionStrategy) 102 && Objects.equals(text, that.text); 76 103 } 77 104 78 105 @Override 79 106 public int hashCode() { 80 return Objects.hash(super.hashCode(), text );107 return Objects.hash(super.hashCode(), text, labelPositionStrategy); 81 108 } 82 109 83 110 @Override 84 111 public String toString() { 85 return "TextElement{" + super.toString() + "text=" + text + '}';112 return "TextElement{" + super.toString() + "text=" + text + " labelPositionStrategy=" + labelPositionStrategy + '}'; 86 113 } 87 114 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/TextLabel.java
r12381 r12476 4 4 import java.awt.Color; 5 5 import java.awt.Font; 6 import java.awt.geom.Point2D; 6 7 import java.util.Objects; 7 8 … … 15 16 import org.openstreetmap.josm.gui.mappaint.styleelement.LabelCompositionStrategy.StaticLabelCompositionStrategy; 16 17 import org.openstreetmap.josm.gui.mappaint.styleelement.LabelCompositionStrategy.TagLookupCompositionStrategy; 17 import org.openstreetmap.josm.gui.mappaint.styleelement.placement.PositionForAreaStrategy;18 18 import org.openstreetmap.josm.tools.CheckParameterUtil; 19 19 import org.openstreetmap.josm.tools.Utils; … … 39 39 public Font font; 40 40 /** 41 * The x offset of the text.42 */43 public int xOffset;44 /**45 * The y offset of the text.46 */47 public int yOffset;48 /**49 41 * The color to draw the text in, includes alpha. 50 42 */ … … 58 50 */ 59 51 public Color haloColor; 60 61 /**62 * The position strategy for this text label.63 */64 private final PositionForAreaStrategy labelPositionStrategy;65 52 66 53 /** … … 70 57 * If null, no label is rendered. 71 58 * @param font the font to be used. Must not be null. 72 * @param xOffset x offset73 * @param yOffset y offset74 59 * @param color the color to be used. Must not be null 75 60 * @param haloRadius halo radius 76 61 * @param haloColor halo color 77 * @param labelPositionStrategy The position in the area. 78 */ 79 protected TextLabel(LabelCompositionStrategy strategy, Font font, int xOffset, int yOffset, Color color, Float haloRadius, 80 Color haloColor, PositionForAreaStrategy labelPositionStrategy) { 62 */ 63 protected TextLabel(LabelCompositionStrategy strategy, Font font, Color color, Float haloRadius, 64 Color haloColor) { 81 65 this.labelCompositionStrategy = strategy; 82 66 this.font = Objects.requireNonNull(font, "font"); 83 this.xOffset = xOffset;84 this.yOffset = yOffset;85 67 this.color = Objects.requireNonNull(color, "color"); 86 68 this.haloRadius = haloRadius; 87 69 this.haloColor = haloColor; 88 this.labelPositionStrategy = Objects.requireNonNull(labelPositionStrategy, "labelPositionStrategy");89 70 } 90 71 … … 97 78 this.labelCompositionStrategy = other.labelCompositionStrategy; 98 79 this.font = other.font; 99 this.xOffset = other.xOffset;100 this.yOffset = other.yOffset;101 80 this.color = other.color; 102 81 this.haloColor = other.haloColor; 103 82 this.haloRadius = other.haloRadius; 104 this.labelPositionStrategy = other.labelPositionStrategy;105 }106 107 /**108 * Copy constructor that changes the position strategy.109 *110 * @param other the other element.111 * @param labelPositionStrategy the position112 */113 private TextLabel(TextLabel other, PositionForAreaStrategy labelPositionStrategy) {114 this.labelCompositionStrategy = other.labelCompositionStrategy;115 this.font = other.font;116 this.xOffset = other.xOffset;117 this.yOffset = other.yOffset;118 this.color = other.color;119 this.haloColor = other.haloColor;120 this.haloRadius = other.haloRadius;121 this.labelPositionStrategy = labelPositionStrategy;122 83 } 123 84 … … 176 137 Font font = StyleElement.getFont(c, s); 177 138 139 Color color = c.get(TEXT_COLOR, defaultTextColor, Color.class); 140 float alpha = c.get(TEXT_OPACITY, 1f, Float.class); 141 color = Utils.alphaMultiply(color, alpha); 142 143 Float haloRadius = c.get(TEXT_HALO_RADIUS, null, Float.class); 144 if (haloRadius != null && haloRadius <= 0) { 145 haloRadius = null; 146 } 147 Color haloColor = null; 148 if (haloRadius != null) { 149 haloColor = c.get(TEXT_HALO_COLOR, Utils.complement(color), Color.class); 150 float haloAlphaFactor = c.get(TEXT_HALO_OPACITY, 1f, Float.class); 151 haloColor = Utils.alphaMultiply(haloColor, haloAlphaFactor); 152 } 153 154 return new TextLabel(strategy, font, color, haloRadius, haloColor); 155 } 156 157 /** 158 * Gets the text-offset property from a cascade 159 * @param c The cascade 160 * @return The text offset property 161 */ 162 public static Point2D getTextOffset(Cascade c) { 178 163 float xOffset = 0; 179 164 float yOffset = 0; … … 189 174 xOffset = c.get(TEXT_OFFSET_X, xOffset, Float.class); 190 175 yOffset = c.get(TEXT_OFFSET_Y, yOffset, Float.class); 191 192 Color color = c.get(TEXT_COLOR, defaultTextColor, Color.class); 193 float alpha = c.get(TEXT_OPACITY, 1f, Float.class); 194 color = Utils.alphaMultiply(color, alpha); 195 196 Float haloRadius = c.get(TEXT_HALO_RADIUS, null, Float.class); 197 if (haloRadius != null && haloRadius <= 0) { 198 haloRadius = null; 199 } 200 Color haloColor = null; 201 if (haloRadius != null) { 202 haloColor = c.get(TEXT_HALO_COLOR, Utils.complement(color), Color.class); 203 float haloAlphaFactor = c.get(TEXT_HALO_OPACITY, 1f, Float.class); 204 haloColor = Utils.alphaMultiply(haloColor, haloAlphaFactor); 205 } 206 207 Keyword positionKeyword = c.get(AreaElement.TEXT_POSITION, null, Keyword.class); 208 PositionForAreaStrategy position = PositionForAreaStrategy.forKeyword(positionKeyword); 209 210 return new TextLabel(strategy, font, (int) xOffset, -(int) yOffset, color, haloRadius, haloColor, position); 176 return new Point2D.Double(xOffset, yOffset); 211 177 } 212 178 … … 223 189 } 224 190 225 /**226 * Gets the strategy that defines where to place the label.227 * @return The strategy. Never null.228 * @since 11722229 */230 public PositionForAreaStrategy getLabelPositionStrategy() {231 return labelPositionStrategy;232 }233 234 /**235 * Creates a new text label with a different position strategy236 * @param labelPositionStrategy The new position strategy to use237 * @return The new label238 */239 public TextLabel withPosition(PositionForAreaStrategy labelPositionStrategy) {240 return new TextLabel(this, labelPositionStrategy);241 }242 243 191 @Override 244 192 public String toString() { … … 249 197 StringBuilder sb = new StringBuilder(96); 250 198 sb.append("labelCompositionStrategy=").append(labelCompositionStrategy) 251 .append(" font=").append(font); 252 if (xOffset != 0) { 253 sb.append(" xOffset=").append(xOffset); 254 } 255 if (yOffset != 0) { 256 sb.append(" yOffset=").append(yOffset); 257 } 258 sb.append(" color=").append(Utils.toString(color)); 199 .append(" font=").append(font) 200 .append(" color=").append(Utils.toString(color)); 259 201 if (haloRadius != null) { 260 202 sb.append(" haloRadius=").append(haloRadius) … … 266 208 @Override 267 209 public int hashCode() { 268 return Objects.hash(labelCompositionStrategy, font, xOffset, yOffset,color, haloRadius, haloColor);210 return Objects.hash(labelCompositionStrategy, font, color, haloRadius, haloColor); 269 211 } 270 212 … … 274 216 if (obj == null || getClass() != obj.getClass()) return false; 275 217 TextLabel textLabel = (TextLabel) obj; 276 return xOffset == textLabel.xOffset && 277 yOffset == textLabel.yOffset && 278 Objects.equals(labelCompositionStrategy, textLabel.labelCompositionStrategy) && 218 return Objects.equals(labelCompositionStrategy, textLabel.labelCompositionStrategy) && 279 219 Objects.equals(font, textLabel.font) && 280 220 Objects.equals(color, textLabel.color) && -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/CompletelyInsideAreaStrategy.java
r12082 r12476 3 3 4 4 import java.awt.Rectangle; 5 import java.awt.geom.Point2D; 5 6 import java.awt.geom.Rectangle2D; 6 7 … … 20 21 * An instance of this class. 21 22 */ 22 public static final CompletelyInsideAreaStrategy INSTANCE = new CompletelyInsideAreaStrategy( );23 public static final CompletelyInsideAreaStrategy INSTANCE = new CompletelyInsideAreaStrategy(0, 0); 23 24 24 protected CompletelyInsideAreaStrategy() { 25 protected final double offsetX; 26 protected final double offsetY; 27 28 protected CompletelyInsideAreaStrategy(double offsetX, double offsetY) { 29 this.offsetX = offsetX; 30 this.offsetY = offsetY; 25 31 } 26 32 … … 89 95 } 90 96 91 private static MapViewPositionAndRotation centerOf(MapViewState mapViewState, Rectangle centeredNBounds) { 92 return new MapViewPositionAndRotation( 93 mapViewState.getForView(centeredNBounds.getCenterX(), centeredNBounds.getCenterY()), 0); 97 private MapViewPositionAndRotation centerOf(MapViewState mapViewState, Rectangle centeredNBounds) { 98 double x = centeredNBounds.getCenterX() + offsetX; 99 double y = centeredNBounds.getCenterY() + offsetY; 100 return new MapViewPositionAndRotation(mapViewState.getForView(x, y), 0); 94 101 } 95 102 … … 98 105 return false; 99 106 } 107 108 @Override 109 public PositionForAreaStrategy withAddedOffset(Point2D addToOffset) { 110 if (Math.abs(addToOffset.getX()) < 1e-5 && Math.abs(addToOffset.getY()) < 1e-5) { 111 return this; 112 } else { 113 return new CompletelyInsideAreaStrategy(offsetX + addToOffset.getX(), offsetY + addToOffset.getY()); 114 } 115 } 116 117 @Override 118 public String toString() { 119 return "CompletelyInsideAreaStrategy [offsetX=" + offsetX + ", offsetY=" + offsetY + "]"; 120 } 121 122 @Override 123 public int hashCode() { 124 final int prime = 31; 125 int result = 1; 126 long temp; 127 temp = Double.doubleToLongBits(offsetX); 128 result = prime * result + (int) (temp ^ (temp >>> 32)); 129 temp = Double.doubleToLongBits(offsetY); 130 result = prime * result + (int) (temp ^ (temp >>> 32)); 131 return result; 132 } 133 134 @Override 135 public boolean equals(Object obj) { 136 if (this == obj) { 137 return true; 138 } 139 if (obj == null) { 140 return false; 141 } 142 if (getClass() != obj.getClass()) { 143 return false; 144 } 145 CompletelyInsideAreaStrategy other = (CompletelyInsideAreaStrategy) obj; 146 return Double.doubleToLongBits(offsetX) == Double.doubleToLongBits(other.offsetX) 147 && Double.doubleToLongBits(offsetY) != Double.doubleToLongBits(other.offsetY); 148 } 100 149 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/OnLineStrategy.java
r11814 r12476 4 4 import java.awt.font.GlyphVector; 5 5 import java.awt.geom.AffineTransform; 6 import java.awt.geom.Point2D; 6 7 import java.awt.geom.Rectangle2D; 7 8 import java.util.ArrayList; … … 332 333 return Math.atan2(end.getInViewY() - start.getInViewY(), end.getInViewX() - start.getInViewX()); 333 334 } 335 336 @Override 337 public PositionForAreaStrategy withAddedOffset(Point2D addToOffset) { 338 if (Math.abs(addToOffset.getY()) < 1e-5) { 339 return this; 340 } else { 341 return new OnLineStrategy(addToOffset.getY() + this.yOffset); 342 } 343 } 344 345 @Override 346 public String toString() { 347 return "OnLineStrategy [yOffset=" + yOffset + "]"; 348 } 349 350 @Override 351 public int hashCode() { 352 final int prime = 31; 353 int result = 1; 354 long temp; 355 temp = Double.doubleToLongBits(yOffset); 356 result = prime * result + (int) (temp ^ (temp >>> 32)); 357 return result; 358 } 359 360 @Override 361 public boolean equals(Object obj) { 362 if (this == obj) { 363 return true; 364 } 365 if (obj == null) { 366 return false; 367 } 368 if (getClass() != obj.getClass()) { 369 return false; 370 } 371 OnLineStrategy other = (OnLineStrategy) obj; 372 if (Double.doubleToLongBits(yOffset) != Double.doubleToLongBits(other.yOffset)) { 373 return false; 374 } 375 return true; 376 } 334 377 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/PartiallyInsideAreaStrategy.java
r12088 r12476 2 2 package org.openstreetmap.josm.gui.mappaint.styleelement.placement; 3 3 4 import java.awt.geom.Point2D; 4 5 import java.awt.geom.Rectangle2D; 5 6 … … 20 21 * An instance of this class. 21 22 */ 22 public static final PartiallyInsideAreaStrategy INSTANCE = new PartiallyInsideAreaStrategy( );23 public static final PartiallyInsideAreaStrategy INSTANCE = new PartiallyInsideAreaStrategy(0, 0); 23 24 24 private PartiallyInsideAreaStrategy() { 25 private PartiallyInsideAreaStrategy(double offsetX, double offsetY) { 26 super(offsetX, offsetY); 25 27 } 26 28 … … 44 46 } 45 47 } 48 49 @Override 50 public PositionForAreaStrategy withAddedOffset(Point2D addToOffset) { 51 if (Math.abs(addToOffset.getX()) < 1e-5 && Math.abs(addToOffset.getY()) < 1e-5) { 52 return this; 53 } else { 54 return new PartiallyInsideAreaStrategy(offsetX + addToOffset.getX(), offsetY + addToOffset.getY()); 55 } 56 } 57 58 @Override 59 public String toString() { 60 return "PartiallyInsideAreaStrategy [offsetX=" + offsetX + ", offsetY=" + offsetY + "]"; 61 } 46 62 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/PositionForAreaStrategy.java
r11755 r12476 3 3 4 4 import java.awt.font.GlyphVector; 5 import java.awt.geom.Point2D; 5 6 import java.awt.geom.Rectangle2D; 6 7 import java.util.List; … … 79 80 } 80 81 } 82 83 /** 84 * Create a new instance of the same strategy adding a offset 85 * @param addToOffset The offset to add 86 * @return The new strategy 87 * @since 12476 88 */ 89 PositionForAreaStrategy withAddedOffset(Point2D addToOffset); 81 90 } -
trunk/test/data/renderer/way-text/data.osm
r12465 r12476 1 1 <?xml version='1.0' encoding='UTF-8'?> 2 2 <osm version='0.6' upload='false' generator='JOSM'> 3 <node id='- 36014' action='modify' visible='true' lat='0.95462883113' lon='0.69245784308' />4 <node id='- 36015' action='modify' visible='true' lat='0.93599139732' lon='0.64577386324' />5 <node id='- 36016' action='modify' visible='true' lat='0.92917836022' lon='0.61790219137' />6 <node id='- 36017' action='modify' visible='true' lat='0.83632453647' lon='0.35060605628' />7 <node id='- 36018' action='modify' visible='true' lat='0.66045089174' lon='0.27991121964'>3 <node id='-41240' action='modify' lat='0.95462883113' lon='0.69245784308' /> 4 <node id='-41242' action='modify' lat='0.93599139732' lon='0.64577386324' /> 5 <node id='-41244' action='modify' lat='0.92917836022' lon='0.61790219137' /> 6 <node id='-41246' action='modify' lat='0.83632453647' lon='0.35060605628' /> 7 <node id='-41248' action='modify' lat='0.66045089174' lon='0.27991121964'> 8 8 <tag k='railway' v='level_crossing' /> 9 9 </node> 10 <node id='-36019' action='modify' visible='true' lat='0.65770696505' lon='0.18596808237' /> 11 <node id='-36020' action='modify' visible='true' lat='0.59627545707' lon='0.10271148998' /> 12 <node id='-36104' action='modify' visible='true' lat='0.87616034313' lon='0.70190515136' /> 13 <node id='-36106' action='modify' visible='true' lat='0.67834542545' lon='0.84762454988' /> 14 <node id='-36108' action='modify' visible='true' lat='0.45474826559' lon='0.7793912778' /> 15 <node id='-36110' action='modify' visible='true' lat='0.41652482996' lon='0.59838396312' /> 16 <node id='-36112' action='modify' visible='true' lat='0.51601034903' lon='0.48176548874' /> 17 <node id='-36114' action='modify' visible='true' lat='0.60557084089' lon='0.63849966061' /> 18 <node id='-41946' action='modify' visible='true' lat='0.33593750068' lon='0.10942032794' /> 19 <node id='-41955' action='modify' visible='true' lat='0.33278745947' lon='0.61343550409' /> 20 <node id='-41982' action='modify' visible='true' lat='0.13433323194' lon='0.80559129' /> 21 <node id='-41983' action='modify' visible='true' lat='0.30758709437' lon='0.91899470463' /> 22 <node id='-42030' action='modify' visible='true' lat='0.1563838248' lon='0.39607895937' /> 23 <node id='-42032' action='modify' visible='true' lat='0.18473455255' lon='0.1377711816' /> 24 <way id='-36013' action='modify' visible='true'> 25 <nd ref='-36014' /> 26 <nd ref='-36015' /> 27 <nd ref='-36016' /> 28 <nd ref='-36017' /> 29 <nd ref='-36018' /> 30 <nd ref='-36019' /> 31 <nd ref='-36020' /> 10 <node id='-41250' action='modify' lat='0.65770696505' lon='0.18596808237' /> 11 <node id='-41252' action='modify' lat='0.59627545707' lon='0.10271148998' /> 12 <node id='-41254' action='modify' lat='0.87616034313' lon='0.70190515136' /> 13 <node id='-41256' action='modify' lat='0.67834542545' lon='0.84762454988' /> 14 <node id='-41258' action='modify' lat='0.45474826559' lon='0.7793912778' /> 15 <node id='-41260' action='modify' lat='0.41652482996' lon='0.59838396312' /> 16 <node id='-41262' action='modify' lat='0.51601034903' lon='0.48176548874' /> 17 <node id='-41264' action='modify' lat='0.60557084089' lon='0.63849966061' /> 18 <node id='-41266' action='modify' lat='0.33593750068' lon='0.10942032794' /> 19 <node id='-41268' action='modify' lat='0.33278745947' lon='0.61343550409' /> 20 <node id='-41270' action='modify' lat='0.06664816464' lon='0.84078758118' /> 21 <node id='-41272' action='modify' lat='0.23990269548' lon='0.95419099581' /> 22 <node id='-41274' action='modify' lat='0.0886988082' lon='0.43127525055' /> 23 <node id='-41276' action='modify' lat='0.11704961586' lon='0.17296747278' /> 24 <node id='-41313' action='modify' lat='0.24096122132' lon='0.05685283988' /> 25 <node id='-41314' action='modify' lat='0.21659475263' lon='0.67414163902' /> 26 <node id='-41328' action='modify' lat='0.33187955464' lon='0.76055992767' /> 27 <node id='-41329' action='modify' lat='0.36121780698' lon='0.99112699543' /> 28 <node id='-41361' action='modify' lat='0.28427927747' lon='0.86907494401' /> 29 <node id='-41372' action='modify' lat='0.48191547356' lon='0.99361566664' /> 30 <node id='-41374' action='modify' lat='0.52523231165' lon='0.93405271234' /> 31 <node id='-41398' action='modify' lat='0.43589103184' lon='0.11370838717' /> 32 <node id='-41399' action='modify' lat='0.74993303663' lon='0.59833424263' /> 33 <node id='-41424' action='modify' lat='0.75264021089' lon='0.09475653807' /> 34 <node id='-41425' action='modify' lat='0.98003625368' lon='0.40340093764' /> 35 <way id='-41278' action='modify'> 36 <nd ref='-41240' /> 37 <nd ref='-41242' /> 38 <nd ref='-41244' /> 39 <nd ref='-41246' /> 40 <nd ref='-41248' /> 41 <nd ref='-41250' /> 42 <nd ref='-41252' /> 32 43 <tag k='highway' v='tertiary' /> 33 44 <tag k='name' v='An der Actien-Zuckerfabrik' /> 34 45 <tag k='test' v='w1' /> 35 46 </way> 36 <way id='- 36105' action='modify' visible='true'>37 <nd ref='- 36114' />38 <nd ref='- 36112' />39 <nd ref='- 36110' />40 <nd ref='- 36108' />41 <nd ref='- 36106' />42 <nd ref='- 36104' />47 <way id='-41280' action='modify'> 48 <nd ref='-41264' /> 49 <nd ref='-41262' /> 50 <nd ref='-41260' /> 51 <nd ref='-41258' /> 52 <nd ref='-41256' /> 53 <nd ref='-41254' /> 43 54 <tag k='test' v='w2' /> 44 55 </way> 45 <way id='-41 948' action='modify' visible='true'>46 <nd ref='-41 946' />47 <nd ref='-41 955' />56 <way id='-41282' action='modify'> 57 <nd ref='-41266' /> 58 <nd ref='-41268' /> 48 59 <tag k='name' v='گلستان ۲' /> 49 60 <tag k='test' v='bidi' /> 50 61 </way> 51 <way id='-41 984' action='modify' visible='true'>52 <nd ref='-4 2032' />53 <nd ref='-4 2030' />54 <nd ref='-41 982' />55 <nd ref='-41 983' />62 <way id='-41284' action='modify'> 63 <nd ref='-41276' /> 64 <nd ref='-41274' /> 65 <nd ref='-41270' /> 66 <nd ref='-41272' /> 56 67 <tag k='name' v='Wolfenbütteler Straße' /> 57 68 <tag k='test' v='opacity' /> 58 69 </way> 70 <way id='-41315' action='modify'> 71 <nd ref='-41313' /> 72 <nd ref='-41314' /> 73 <tag k='name' v='Teststraße' /> 74 <tag k='test' v='opacity' /> 75 </way> 76 <way id='-41327' action='modify'> 77 <nd ref='-41328' /> 78 <nd ref='-41361' /> 79 <nd ref='-41329' /> 80 <nd ref='-41372' /> 81 <nd ref='-41374' /> 82 <tag k='name' v='گلستان ۲' /> 83 <tag k='test' v='bidi' /> 84 </way> 85 <way id='-41400' action='modify'> 86 <nd ref='-41398' /> 87 <nd ref='-41399' /> 88 <tag k='test' v='w2' /> 89 </way> 90 <way id='-41426' action='modify'> 91 <nd ref='-41424' /> 92 <nd ref='-41425' /> 93 <tag k='highway' v='tertiary' /> 94 <tag k='name' v='An der A.-Z.' /> 95 <tag k='test' v='w1' /> 96 </way> 59 97 </osm> -
trunk/test/data/renderer/way-text/style.mapcss
r12465 r12476 46 46 color: cyan; 47 47 width: 3; 48 text-offset-y: - 2;48 text-offset-y: -5.5; 49 49 }
Note:
See TracChangeset
for help on using the changeset viewer.