-
Notifications
You must be signed in to change notification settings - Fork 14
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
Use event in main view #19
Conversation
Thanks!
I wonder if the APIs between sources and layers could be symmetrical:
|
I agree. MapLibre uses a |
|
The index is the index of the layer in the map tool (view), not in the list of layer in the shared document. |
Got it, thanks! |
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.
Thank you!
I just have a small suggestion but I believe we can also resolve it in a separate PR
* @param id - the source id. | ||
* @param source - the source object. | ||
*/ | ||
addSource(id: string, source: IJGISSource): void { |
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.
Should we start extracting these APIs in their own class implementing an IMapViewer
interface?
That way we prepare the ground for future possible implementations/plugins
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.
Yeah let's resolve the comment separately, your PR will help Greg and I in our developments (that way we can see the changes we do on the map)
Follow up #17
This PR includes:
mainview.tsx
to move it then to an base View. It adds functionssetSource
,removeSource
,updateLayers
,updateLayer
andremoveLayer
that could be implemented by a plugin (see Map viewers #7 for reference)