Skip to content

Fix symbol rendering for multipoints - #3763

Merged
lucaswoj merged 3 commits into
masterfrom
multipoint-symbol-placement
Dec 13, 2016
Merged

lucaswoj merged 3 commits into
masterfrom
multipoint-symbol-placement

Conversation

@lucaswoj

@lucaswoj lucaswoj commented Dec 8, 2016

Copy link
Copy Markdown
Contributor

Via a support request, @mapsam and I discovered that we do not render any symbols for multipoint geometries. This is inconsistent with our behaviour for circles in which we do render a circle at each point in the multipoint geometry (see #2027).

This PR tries to differentiate multipoint geometries from polygons and perform the correct label placement in each case.

cc @mourner @flippmoke @mapsam @jfirebaugh @colleenmcginnis

Open Questions

  • Is there a better way to differentiate between a multipoint and a polygon within GL JS?
  • Should we have a different symbol-placement modes for point, line, and polygon / centroid?
  • Are there other cases in which we don't handle multipoints properly?

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • manually test the debug page

@mourner mourner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rely on feature.type for discerning between points and polygons?

@lucaswoj
lucaswoj force-pushed the multipoint-symbol-placement branch from ecb4af5 to 8812ad4 Compare December 9, 2016 00:31
@lucaswoj

lucaswoj commented Dec 9, 2016

Copy link
Copy Markdown
Contributor Author

Updated with new tests & use of the vector tile type field 😎

@lucaswoj

lucaswoj commented Dec 9, 2016

Copy link
Copy Markdown
Contributor Author

It's unfortunate that we place circles & symbols differently for lines, polygons, and multi-things. If pole-of-inaccessability symbol placement were a symbol-placement mode, we could have more consistent rendering.

@lucaswoj

lucaswoj commented Dec 9, 2016

Copy link
Copy Markdown
Contributor Author

PR for new tests @ mapbox/mapbox-gl-test-suite#192

@lucaswoj
lucaswoj merged commit 32fcbfe into master Dec 13, 2016
@lucaswoj
lucaswoj deleted the multipoint-symbol-placement branch December 13, 2016 20:03
jfirebaugh added a commit to mapbox/mapbox-gl-native that referenced this pull request Dec 15, 2016
jfirebaugh added a commit to mapbox/mapbox-gl-native that referenced this pull request Dec 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants