Skip to content

Commit

Permalink
Add a marker feature.
Browse files Browse the repository at this point in the history
This adds an efficient webgl marker feature.  It uses slightly more
memory than the point feature (one more float value per marker is passed
to the GPU than for points).  A variety of shapes are defined: ellipses,
rectangles, isosceles triangles, and ovals, plus stellations of each of
these.  The shapes can specify orientation, and can automatically scale
and/or rotate with the map.

There is one distinct difference between markers and points.  The radius
of the marker is the total radius, including any stroke.  The size of
the point is the combination of the radius and the stroke.

These use nearly the same vertex shaders as the point feature, but a
vastly more complex fragment shader.  As such, rendering complex shapes
will saturate the GPU sooner than for basic points.

At some future point, it is intended to add image markers, where images
or svgs could be rendered via a texture map.  In this case, the intent
is to use a single texture buffer and pack multiple images into it with
a small space between each.

Resolves #820 (though a new issue should be created for image/svg
markers).
  • Loading branch information
manthey committed Oct 29, 2019
1 parent a64268b commit ab63e74
Show file tree
Hide file tree
Showing 19 changed files with 1,811 additions and 110 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
### Changes
- Line segments with zero width or zero opacity won't be found by pointSearch or polygonSearch (#1041)

### Features
- Added a marker feature (#1035)

### Bug Fixes
- Removed extra calls to sceneObject constructors (#1039)
- Fixed an issue with rendering on hidden tabs in Chrome (#1042)
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ module.exports = $.extend({
lineFeature: require('./lineFeature'),
map: require('./map'),
mapInteractor: require('./mapInteractor'),
markerFeature: require('./markerFeature'),
meshFeature: require('./meshFeature'),
object: require('./object'),
osmLayer: require('./osmLayer'),
Expand Down
Loading

0 comments on commit ab63e74

Please sign in to comment.