Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f65f160
Wayline: a full-stack ride-hailing sample, its CI and an Initializr t…
shai-almog Oct 10, 2026
6794d2d
Merge remote-tracking branch 'origin/master' into wayline-sample
shai-almog Oct 10, 2026
2009a66
Wayline: review fixes, and two builds this branch broke
shai-almog Oct 10, 2026
c549ded
Merge remote-tracking branch 'origin/master' into wayline-sample
shai-almog Oct 10, 2026
e56060b
Reseed the Linux and Windows map baselines
shai-almog Oct 10, 2026
b1f13cd
Playground demo test: read a sample's bounds once the overlay has cau…
shai-almog Oct 10, 2026
734751d
Build an application with no Maven wrapper for iOS, and reseed two iO…
shai-almog Oct 10, 2026
8f2bf22
Initializr: offer the full-stack template from 7.0.277
shai-almog Oct 11, 2026
3510dd4
Lay a road name out by its letters' share of the drawn name, and rese…
shai-almog Oct 11, 2026
e18980f
Merge remote-tracking branch 'origin/master' into wayline-sample
shai-almog Oct 11, 2026
3f05ca2
Wayline: second round of review fixes
shai-almog Oct 11, 2026
b486276
Wayline: give the generated template's theme compile a display, and t…
shai-almog Oct 11, 2026
93d8d44
Merge remote-tracking branch 'origin/master' into wayline-sample
shai-almog Oct 11, 2026
9fcfb20
Merge remote-tracking branch 'origin/master' into wayline-sample
shai-almog Oct 11, 2026
639c501
Reseed the macOS map baselines for road names laid out by drawn width
shai-almog Oct 11, 2026
626c855
Say what laying a road name out by drawn width does and does not fix
shai-almog Oct 11, 2026
c1b5735
Merge remote-tracking branch 'origin/master' into wayline-sample
shai-almog Oct 11, 2026
935e652
Initializr: let the generated-project build test take as long as a co…
shai-almog Oct 12, 2026
8ed4eb6
Merge remote-tracking branch 'origin/master' into wayline-sample
shai-almog Oct 12, 2026
35ca0a8
Merge remote-tracking branch 'origin/master' into wayline-sample
shai-almog Oct 12, 2026
1dc66ed
Wayline: build the theme without a display, as the compiler now does
shai-almog Oct 12, 2026
3e6f04c
Rebaseline hello and translator RAM on Windows arm64 for the tightene…
shai-almog Oct 13, 2026
3e8f104
Merge remote-tracking branch 'origin/master' into wayline-sample
shai-almog Oct 13, 2026
a12d160
Wayline: retryable refunds, retired addresses, admin races and five m…
shai-almog Oct 13, 2026
92cdab1
Merge remote-tracking branch 'origin/master' into wayline-sample
shai-almog Oct 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
473 changes: 473 additions & 0 deletions .github/workflows/wayline.yml

Large diffs are not rendered by default.

339 changes: 334 additions & 5 deletions CodenameOne/src/com/codename1/maps/MapView.java

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions CodenameOne/src/com/codename1/maps/vector/LabelCandidate.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
*/
package com.codename1.maps.vector;

import com.codename1.ui.Font;

/// A single label to draw, captured at tile-decode time. Its anchor is stored
/// in integer-zoom world pixels (256px tiles) so the engine can convert it to
/// the screen at any fractional camera zoom without re-walking the tile.
Expand All @@ -42,6 +44,31 @@ final class LabelCandidate {
/// for a label placed at a point. [#worldX]/[#worldY] is its midpoint.
final double[] path;

// What [LabelEngine] measured this text as, and the font it measured it
// in: every label in view is measured on every frame, most of them only
// to be found in the way of another.
private Font measuredFont;
private int measuredHeight;
int textWidth;
boolean perGlyph;
/// The widths the text is laid along a line by, or null when it has only
/// been measured whole.
int[] cellWidths;

/// Whether the measurements here are of this text in `font`, while it
/// answered the height `height`.
boolean measured(Font font, int height) {
return measuredFont == font && measuredHeight == height; //NOPMD CompareObjectsWithEquals
}

void remember(Font font, int height, int width, boolean glyphs, int[] widths) {
measuredFont = font;
measuredHeight = height;
textWidth = width;
perGlyph = glyphs;
cellWidths = widths;
}

LabelCandidate(String text, double worldX, double worldY, int tileZoom,
int textColor, int haloColor, double sizePx) {
this(text, worldX, worldY, tileZoom, textColor, haloColor, sizePx, null);
Expand Down
493 changes: 411 additions & 82 deletions CodenameOne/src/com/codename1/maps/vector/LabelEngine.java

Large diffs are not rendered by default.

247 changes: 181 additions & 66 deletions CodenameOne/src/com/codename1/maps/vector/MapStyle.java

Large diffs are not rendered by default.

51 changes: 43 additions & 8 deletions CodenameOne/src/com/codename1/maps/vector/StyleLayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ public final class StyleLayer {
private String textField;

private String filterKey;
private String filterValue;
private String[] filterValues;
private String excludeKey;
private String excludeValue;
private String[] excludeValues;
private boolean linesOnly;

StyleLayer(int type) {
this.type = type;
Expand Down Expand Up @@ -150,31 +151,65 @@ String getTextField() {
}

StyleLayer filter(String key, String value) {
return filterIn(key, new String[]{value});
}

/// Keeps only the features whose `key` attribute is one of `values`: the
/// classes of road that are drawn as main roads, say.
StyleLayer filterIn(String key, String[] values) {
this.filterKey = key;
this.filterValue = value;
this.filterValues = values;
return this;
}

/// Drops features whose `key` attribute is one of `values`.
StyleLayer excludeIn(String key, String[] values) {
this.excludeKey = key;
this.excludeValues = values;
return this;
}

/// Makes a line layer stroke lines alone. A layer of roads also carries
/// areas -- piers, squares, the decks of bridges -- and stroking the edge
/// of an area as though it were a road draws a road around every pier.
StyleLayer linesOnly() {
this.linesOnly = true;
return this;
}

boolean isLinesOnly() {
return linesOnly;
}

/// Drops features whose `key` attribute equals `value` (e.g. excluding
/// `class=ferry` so ferry routes are not drawn as roads across the water).
StyleLayer excludeFilter(String key, String value) {
this.excludeKey = key;
this.excludeValue = value;
return this;
return excludeIn(key, new String[]{value});
}

/// Whether `feature` passes this layer's optional equality / exclusion filters.
boolean accepts(VectorFeature feature) {
if (excludeKey != null) {
Object ev = feature.getAttribute(excludeKey);
if (ev != null && excludeValue != null && excludeValue.equals(String.valueOf(ev))) {
if (ev != null && among(excludeValues, String.valueOf(ev))) {
return false;
}
}
if (filterKey == null) {
return true;
}
Object v = feature.getAttribute(filterKey);
return v != null && filterValue != null && filterValue.equals(String.valueOf(v));
return v != null && among(filterValues, String.valueOf(v));
}

private static boolean among(String[] values, String value) {
if (values != null) {
for (String candidate : values) {
if (candidate != null && candidate.equals(value)) {
return true;
}
}
}
return false;
}
}
3 changes: 3 additions & 0 deletions CodenameOne/src/com/codename1/maps/vector/TileRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ private static void renderLines(Graphics g, List features, StyleLayer sl, Viewpo
if ((gt != VectorFeature.GEOM_LINESTRING && gt != VectorFeature.GEOM_POLYGON) || !sl.accepts(f)) {
continue;
}
if (gt == VectorFeature.GEOM_POLYGON && sl.isLinesOnly()) {
continue;
}
List parts = f.getParts();
for (Object partObj : parts) {
int[] line = (int[]) partObj;
Expand Down
Loading
Loading