Skip to content

Miscellaneous mapbox tweaks #681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jun 23, 2016
Merged

Miscellaneous mapbox tweaks #681

merged 16 commits into from
Jun 23, 2016

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented Jun 22, 2016

@chriddyp please review.

What this PR adds

  • Two new mapbox.layers types ➡️ 'circle' and 'symbol' (along side the current 'fill' and 'line'). This allows GeoJSON point geometries to be drawn as mapbox circle or symbol layers.
  • Some mapbox jasmine tests are now tested on CircleCi. All mapbox jasmine tests that do no required a gl context are now tested on CircleCI. So that hot fixes like 9c72548 won't be needed again. See 4a8563b for more.

What this PR modifies

  • The mapbox.layers attribute changed a little. They are now more one-to-one with the mapbox layer specs where each layer type gets a container object of its own to fill in style attribute. Note that color in inherited from container to container. See 32973fc for more details.
  • mapbox.layers[i].type default is now 'circle'. So that even Point GeoJSON can be seen with the default layer type.
  • mapbox.layers[i].color is now set layer-wide. It corresponds to the primary color of the layer regardless of its type.

What this PR fixes

  • Some edge case (probably a mapbox-gl bug) when switching the layer type to 'fill' c1cd50c
  • Bearing and pitch angles changed on mouse move are recorded in user data 17f3378

gifrecord_2016-06-22_161946

etpinard added 7 commits June 22, 2016 13:18
- to skip over test the require a gl context,
  if gl isn't supported
- allows us to run _some_ mapbox tests on CircleCI
- so that Point geojson can be displayed as mapbox circle layers
- change layer attribute to be more one-to-one with the mapbox api,
  where styles of different layer types will be set in different
  container objects
@etpinard etpinard added bug something broken status: reviewable labels Jun 22, 2016
@chriddyp
Copy link
Member

circle instead of marker to keep in sync with mapboxgl's terminology (in case that we eventually add other things like symbol, background, or raster?)

@etpinard
Copy link
Contributor Author

circle instead of marker to keep in sync with mapboxgl's terminology

bingo 💥

'Sets the circle color.',
'Has an effect only when `type` is set to *circle*.'
].join(' ')
}
Copy link
Member

Choose a reason for hiding this comment

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

missing opacity here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chriddyp
Copy link
Member

💃 looks good to me!

'If `type` is *line*, color corresponds to the line color',
'If `type` is *fill*, color corresponds to the fill color',
'If `type` is *symbol*, color corresponds to the icon color'
].join(' ')
Copy link
Contributor Author

@etpinard etpinard Jun 22, 2016

Choose a reason for hiding this comment

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

cleaner, right?

@etpinard etpinard merged commit ec80e39 into master Jun 23, 2016
@etpinard etpinard deleted the mapbox-tweaks branch June 23, 2016 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants