Repository navigation
Add Location Indicator layer - #16340
Conversation
a212677 to
0159552
Compare
4b9e1b7 to
3c51a80
Compare
3c51a80 to
0385b33
Compare
0385b33 to
c11f652
Compare
|
cc @mapbox/maps-android @mapbox/maps-ios |
c093475 to
ecca894
Compare
9a657b9 to
5539c79
Compare
abda85d to
a7f40b1
Compare
|
|
||
| class RenderLocationIndicatorImpl { | ||
| protected: | ||
| struct vec2 { |
There was a problem hiding this comment.
looks like a generic class, don't we already have it (or shall be put to a generic place)?
There was a problem hiding this comment.
the closest seems to be Point, missing methods such as normalize(d) and length
3cbea18 to
a6f9351
Compare
New key is "G" in mbgl-glfw, cycling between no puck, centered in the viewport and positioned in Tokyo.
This change introduces a new property type, Rotation, that uses a custom interpolator, and that is currently applied to all style properties named "bearing", with a period attribute.
| "top-image-size" : 16, | ||
| "shadow-image-size" : 112, | ||
|
|
||
| "accuracy-radius-color": "rgba(255,0,0,0.2)", |
There was a problem hiding this comment.
could you test zoom dependent radius color or image size? Using interpolate or step expression https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/#interpolate ?
| "location" : [ 35.693055, 139.766707, 0], | ||
| "accuracy-radius": 90.0, | ||
| "bearing-image-size" : 48, | ||
| "top-image-size" : 16, |
There was a problem hiding this comment.
all image-size properties should be a scale factor, similar to icon-size
There was a problem hiding this comment.
Should we rename to image-scale then? calling these properties -size seems def. wrong
| "accuracy-radius-transition": { "duration": 0, "delay": 0 }, | ||
| "bearing-image-size-transition": { "duration": 0, "delay": 0 }, | ||
| "top-image-size-transition": { "duration": 0, "delay": 0 }, | ||
| "shadow-image-size-transition": { "duration": 0, "delay": 0 }, | ||
| "accuracy-radius-color-transition": { "duration": 0, "delay": 0 }, | ||
| "accuracy-radius-border-color-transition": { "duration": 0, "delay": 0 }, |
There was a problem hiding this comment.
these could be removed, from all tests
| namespace { | ||
| const std::string mbglPuckAssetsPath{MAPBOX_PUCK_ASSETS_PATH}; | ||
|
|
||
| mbgl::Color premultiply(mbgl::Color c) { |
There was a problem hiding this comment.
you can use multiplication operator for color.
There was a problem hiding this comment.
that seems to multiply also alpha
| "perspective-compensation": { | ||
| "type": "number", | ||
| "default": "0.85", | ||
| "property-type": "data-constant", | ||
| "expression": { | ||
| "interpolated": true, | ||
| "parameters": [ | ||
| "zoom" | ||
| ] | ||
| }, | ||
| "doc": "The amount of the perspective compensation, between 0 and 1. A value of 1 produces a location indicator of constant width across the screen. A value of 0 makes it scale naturally according to the viewing projection." | ||
| }, | ||
| "image-tilt-displacement": { | ||
| "type": "number", | ||
| "property-type": "data-constant", | ||
| "default": "0", | ||
| "units": "pixels", | ||
| "expression": { | ||
| "interpolated": true, | ||
| "parameters": [ | ||
| "zoom" | ||
| ] | ||
| }, | ||
| "doc": "The displacement off the center of the top image and the shadow image when the pitch of the map is greater than 0. This helps producing a three-dimensional appearence." | ||
| } |
There was a problem hiding this comment.
Looks like these properties are purely related to rendering, could be converted to paint properties?
| }, | ||
| "bearing-image-size": { | ||
| "type": "number", | ||
| "units": "pixels", |
There was a problem hiding this comment.
Change to scale factor
Launch Checklist
@mapbox/maps-android @mapbox/maps-ios @mapbox/core-sdkif this PR adds or updates a public API@mapbox/gl-jsif this PR includes shader changes or needs a js portneeds changeloglabel if a changelog is needed (remove label when added)