-
Notifications
You must be signed in to change notification settings - Fork 129
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
update mapboxgl control system, 0.27.0 fixes #98
Conversation
🤔 hmmm tests aren't going to work on CI since we are relying on WebGL to initialize.
|
@tmcw ready for review! |
|
||
this.subscribedActions(); | ||
if (this._map.loaded()) this.mapState() | ||
else this._map.on('load', () => this.mapState()); | ||
|
||
return el; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This updates .onAdd
but not .onRemove
- I think that'll break map.removeControl
, which expects .onRemove
to exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tmcw Woops, just added onRemove
. Good catch!
@tristen I've updated the style slightly and now instructions are located underneath the controls. How do you feel about this update? |
Resolves #94, which opens the door for this plugin to use gl-js
0.27.0
.What changed?
mapboxgl
orwindow.mapboxgl
within the pluginmap.addControl
for adding the two geocoders, since we can no longer append controls to custom divs. Since this plugin relied on that, we need to not use the control system internally and just append withappendChild
to the proper element for the directions UIrequire
and just useimport
Uses both import and require #96TODO
accessToken
through to the geocoders. Not sure how to access it at the point of initialization like the directions API does.cc @tmcw @tristen for the review