Repository navigation
Label street trees on the web and keep label sides across pans - #40
Merged
Merged
Conversation
Port of the android-sdk / ios-sdk street-tree labels. From zoom 16 each visible tree is labelled with its species, placed by a per-road chooser (vertical text above/below the road, horizontal left/right). Each road keeps its previous side while it still places at least two thirds as many labels as the best side, so panning no longer flips labels. Labels are chosen again whenever the camera stops; on the first load, where web maps report no visible region, a box around the centre stands in. `?camera=lat,lng,zoom` opens the page at a given spot.
js-sdk-core#23 adds labelWritingMode and draws tile labels separately; react-for-here#10 fixes the half-size marker tiles on HERE.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port of the android-sdk / ios-sdk street-tree labels to
examples/basic.Changes
streetTreeLabels.tschooses one side per road: vertical text above/below a horizontal road, horizontal text left/right of a vertical one.onCameraMoveEnd). On first load, when the map reports no visible region, a box around the centre is used instead.?camera=lat,lng,zoomopens the page at a given spot.Depends on
labelWritingMode, separate tile labels, batched redraws)Both are merged;
js-sdk-coreandreact-for-herenow point at their merge commits (c7fb94d).Verification
Headless Chrome, DPR 2: labels appear from zoom 16, keep their side across pans, and are the same size on MapLibre, Google Maps, OpenLayers, Leaflet, deck.gl, Longdo, Mapbox, TomTom, MapTiler, Mappls and HERE.