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

Map css +test works #16

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ $RECYCLE.BIN/
# NPM
# ----

# Ignoring the package-lock.json file
package-lock.json

**/node_modules/
ipyopenlayers/nbextension/index.*

Expand All @@ -156,4 +159,6 @@ ipyopenlayers/nbextension/index.*
ipyopenlayers/labextension
ipyopenlayers/nbextension

!ipyopenlayers/nbextension/extensions.js

.yarn
26 changes: 26 additions & 0 deletions css/widget.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
.custom-widget {
padding: 0px 2px;
}
.ol-container {
height: 100%;
width: 100%;
}

.lm-Widget.lm-Panel.jp-OutputArea-child.jp-OutputArea-executeResult{
height: 100%;
overflow: hidden;
flex: 1 1 auto;
}

.lm-Widget.lm-Panel.jp-OutputArea-output {
height: 100%;
overflow: hidden;
flex: 1 1 auto;
}

.lm-Widget.custom-widget {
padding: 0px 2px;
display: flex;
flex-direction: column;
flex: 1 1 auto;
width: 100%;
height: 100%;
min-height: 500px;
}
133 changes: 103 additions & 30 deletions examples/introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3265c9dce2864936a1f98ae5c591f899",
"model_id": "d8f5c32afbf64921bca30f0faf9363ee",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -51,6 +51,26 @@
"m"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"4.0"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"m.zoom"
]
},
{
"cell_type": "code",
"execution_count": 5,
Expand Down Expand Up @@ -124,7 +144,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3265c9dce2864936a1f98ae5c591f899",
"model_id": "0387237889744294ad4966279e4f39dd",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -172,7 +192,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -181,7 +201,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -192,7 +212,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -202,7 +222,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -211,7 +231,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -222,7 +242,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -231,7 +251,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -242,7 +262,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -251,7 +271,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -260,7 +280,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -296,7 +316,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -305,7 +325,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -314,7 +334,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -323,7 +343,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 28,
"metadata": {},
"outputs": [
{
Expand All @@ -335,7 +355,7 @@
" 'properties': {'name': 'Null Island'}}]}"
]
},
"execution_count": 30,
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -346,8 +366,12 @@
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"execution_count": 29,
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"outputs": [],
"source": [
"import matplotlib as mpl\n",
Expand All @@ -369,7 +393,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 30,
"metadata": {
"jupyter": {
"source_hidden": true
Expand All @@ -385,7 +409,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 31,
"metadata": {
"jupyter": {
"source_hidden": true
Expand All @@ -408,8 +432,10 @@
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"execution_count": 32,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
Expand All @@ -436,7 +462,7 @@
" '#08306b']"
]
},
"execution_count": 34,
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -447,7 +473,7 @@
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": 33,
"metadata": {
"jupyter": {
"source_hidden": true
Expand All @@ -466,7 +492,7 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 34,
"metadata": {
"jupyter": {
"source_hidden": true
Expand Down Expand Up @@ -508,7 +534,7 @@
" 'fillOpacity': 0.5}}}"
]
},
"execution_count": 36,
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -519,7 +545,7 @@
},
{
"cell_type": "code",
"execution_count": 38,
"execution_count": 35,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -528,7 +554,7 @@
},
{
"cell_type": "code",
"execution_count": 39,
"execution_count": 36,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -537,13 +563,60 @@
},
{
"cell_type": "code",
"execution_count": 40,
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[-68.20312499999996, 36.536794394023914]"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"m.center"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"4.131608506719787"
]
},
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"m.zoom"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [],
"source": [
"m.remove_layer(g)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
Loading
Loading