mapbox / mapbox-gl-directions

Directions plugin for mapbox-gl-js using Mapbox Directions API.
https://mapbox.com/mapbox-gl-js/example/mapbox-gl-directions/
ISC License
237 stars 125 forks source link

Make route padding configurable #243

Closed malwoodsantoro closed 4 years ago

malwoodsantoro commented 4 years ago

This PR makes padding surrounding a route configurable on a MapboxDirections object. Padding is currently set to 80. This allows for users to pass in a specific number of pixels or a PaddingOptions object. Especially useful for making sure no part of the route is hidden by the location of the directions control on top of the map.

malwoodsantoro commented 4 years ago

@ryanhamley from what I can tell, CircleCI is failing because the circle.yml file needs to be updated so it is compatible with 2.0 requirements. Should I open a separate PR to do this?

ryanhamley commented 4 years ago

@malwoodsantoro Why did the CI config change for this PR? Not saying it isn't a good idea to update it to 2.x but can you revert the changes to the config in this PR and then update CI in a separate PR?

malwoodsantoro commented 4 years ago

Will do, @ryanhamley. After reverting, the build error message is [#] required key [jobs] not found. Looking at the documentation, this makes sense as jobs is now a required key. I'll open up a new PR for these changes 👍

ryanhamley commented 4 years ago

Ah, I didn't realize this was just failing by default on Circle. It probably makes sense to update the config in a separate PR, merge it master then rebase this branch against master to pull in the new config (git rebase -i master while on this branch should do the trick as long as master is up to date).

If you need guidance on updating the config, let me know. Maybe we can walk through that on our call next week.