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 4, 2019
1 parent 76faac1 commit 7e8b991
Show file tree
Hide file tree
Showing 20 changed files with 1,812 additions and 115 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
## Unreleased

### Features
- The osmLayer now has predefined `tileSources` that can be used with the `source` method or property to switch multiple parameters at once. (#1020)
- The osmLayer now has predefined `tileSources` that can be used with the `source` method or property to switch multiple parameters at once (#1020)
- Added a marker feature (#1035)

### Improvements
- Points with small radii or thin strokes are rendered better (#1021)
Expand All @@ -13,10 +14,10 @@
- Less data is transfered to the GPU when only styles have changed in webgl line or polygon features (#1016)

### Changes
- Switched the default tile server to Stamen Design's toner-lite. (#1020)
- Switched the default tile server to Stamen Design's toner-lite (#1020)

### Bug Fixes
- Mouse wheel events didn't recompute gcs coordinates, so a wheel event without a previous move event coult list the wrong location (#1027)
- Mouse wheel events didn't recompute gcs coordinates, so a wheel event without a previous move event could list the wrong location (#1027)
- Original event data was not included with actionwheel events (#1030)

## Version 0.19.6
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 7e8b991

Please sign in to comment.