Skip to content
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

Notebook API #38

Merged
merged 19 commits into from
Jul 12, 2024
Merged

Notebook API #38

merged 19 commits into from
Jul 12, 2024

Conversation

martinRenou
Copy link
Member

@martinRenou martinRenou commented Jul 11, 2024

Also fix #39

Screencast.from.2024-07-11.13-15-38.mp4

@martinRenou martinRenou added the enhancement New feature or request label Jul 11, 2024
Copy link
Contributor

Binder 👈 Launch a Binder on branch martinRenou/jupytergis/notebook_api

@martinRenou
Copy link
Member Author

Screenshot from 2024-07-11 15-59-51

The GeoJSON layer works great @brichet !

@martinRenou martinRenou marked this pull request as ready for review July 11, 2024 14:11
@martinRenou martinRenou force-pushed the notebook_api branch 2 times, most recently from 4d3b16a to d65fd07 Compare July 11, 2024 14:43
@davidbrochart
Copy link
Collaborator

Strangely, when I run this code I cannot see anything in the notebook, unlike in the separately opened test.jGIS document:

from jupytergis_lab import GISDocument

doc = GISDocument("test.jGIS")
doc

@davidbrochart
Copy link
Collaborator

That's because I didn't install your branch 😄

@martinRenou
Copy link
Member Author

Actually I think you found a bug.

It seems the CSS of maplibre is not in the page unless you already opened a jGIS file, I'll look into it

@davidbrochart
Copy link
Collaborator

I cannot add the GeoJSON layer, is that what you are referring to?

@martinRenou
Copy link
Member Author

I cannot add the GeoJSON layer, is that what you are referring to?

No, do you have an error?

@davidbrochart
Copy link
Collaborator

No, no error even if the file path is wrong.

@davidbrochart
Copy link
Collaborator

No Python error but lots of errors in the browser console, just after adding the raster layer:

Error: sources.6a45e5b3-1dd1-4739-9d94-afdbaced5bb5: missing required property "data"
Error: layers.20136e59-358a-438f-8d3e-7f5668483fb0: source "6a45e5b3-1dd1-4739-9d94-afdbaced5bb5" not found
Error: Cannot style non-existing layer "20136e59-358a-438f-8d3e-7f5668483fb0".
...

@martinRenou
Copy link
Member Author

martinRenou commented Jul 12, 2024

please update snapshots!!!

@martinRenou martinRenou marked this pull request as ready for review July 12, 2024 14:32
@martinRenou martinRenou reopened this Jul 12, 2024
Co-authored-by: David Brochart <david.brochart@gmail.com>
@martinRenou
Copy link
Member Author

@davidbrochart thanks for the review!

@martinRenou martinRenou merged commit 49ede6e into geojupyter:main Jul 12, 2024
4 of 5 checks passed
@martinRenou martinRenou deleted the notebook_api branch July 12, 2024 15:35
Copy link
Collaborator

@brichet brichet left a comment

Choose a reason for hiding this comment

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

Thanks @martinRenou, I had some minor changes.
We'll update it in a follow up PR.


this._initializedPosition = true;
}
}

private updateOptions(options: IJGISOptions) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
private updateOptions(options: IJGISOptions) {
updateOptions(options: IJGISOptions) {

This one should probably not be private, since it is supposed to be implemented by plugins.

Comment on lines +110 to +111
path: str = None,
data: Dict = None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
path: str = None,
data: Dict = None,
path: str | None = None,
data: Dict | None = None,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GeoJSON file path is not relative to the jGIS file
3 participants