Skip to content

Commit 9638197

Browse files
committed
added doc
1 parent d493136 commit 9638197

31 files changed

+1212
-248
lines changed

docs/europe_110.geo.json

+1
Large diffs are not rendered by default.

docs/source/api_reference/index.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
API Reference
2+
=============
3+
4+
.. automodule:: ipyopenlayers.openlayers
5+
:members:
6+
:no-index:

docs/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181

182182

183183
# Example configuration for intersphinx: refer to the Python standard library.
184-
intersphinx_mapping = {'https://docs.python.org/': None}
184+
intersphinx_mapping = {'python': ('https://docs.python.org/3/', None)}
185185

186186
# Read The Docs
187187
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Fullscreen Control
2+
==================
3+
4+
5+
The Fullscreen Control in `ipyopenlayers` allows users to toggle the map view between fullscreen and windowed modes. This control enhances the user experience by providing an easy way to expand the map to occupy the entire screen.
6+
7+
8+
Example
9+
-------
10+
11+
12+
.. jupyter-execute::
13+
14+
15+
from ipyopenlayers import Map, FullScreen
16+
17+
18+
# Create a map with initial zoom level and center coordinates
19+
m = Map(center=[0, 0], zoom=2)
20+
21+
22+
# Add a FullscreenControl to the map
23+
fullscreen_control = FullScreen()
24+
m.add_control(fullscreen_control)
25+
26+
27+
# Display the map
28+
m
29+
30+
31+
32+
33+
Attributes
34+
----------
35+
36+
37+
.. autoclass:: ipyopenlayers.openlayers.FullScreen
38+
:members:
39+
40+

docs/source/controls/index.rst

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Controls
2+
===================
3+
Controls provide interactive elements on a map that allow users to manipulate the map view or access additional functionalities. These controls can include zoom buttons, layer switches, and other user interface elements that enhance the usability and functionality of the map.
4+
5+
.. toctree::
6+
:maxdepth: 1
7+
8+
zoomslider_control
9+
scaleline_control
10+
fullscreen_control
11+
mouseposition_control
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Mouse Position Control
2+
======================
3+
4+
5+
The Mouse Position Control in `ipyopenlayers` shows the geographical coordinates of the mouse pointer on the map. This control is useful for users who need to know the precise location of their cursor within the map view.
6+
7+
8+
Example
9+
-------
10+
11+
12+
.. jupyter-execute::
13+
14+
15+
from ipyopenlayers import Map, MousePosition
16+
17+
18+
# Create a map with initial zoom level and center coordinates
19+
m = Map(center=[0, 0], zoom=2)
20+
21+
22+
# Add a MousePositionControl to the map
23+
mouseposition_control = MousePosition()
24+
m.add_control(mouseposition_control)
25+
26+
27+
# Display the map
28+
m
29+
30+
31+
32+
33+
Attributes
34+
----------
35+
36+
37+
.. autoclass:: ipyopenlayers.openlayers.MousePosition
38+
:members:
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Scaleline Control
2+
=================
3+
4+
5+
The Scaleline Control in `ipyopenlayers` displays a scale line on the map, providing users with a visual reference for the map's scale. This helps users to understand the distances represented on the map at the current zoom level.
6+
7+
8+
Example
9+
-------
10+
11+
12+
.. jupyter-execute::
13+
14+
15+
from ipyopenlayers import Map, ScaleLine
16+
17+
18+
# Create a map with initial zoom level and center coordinates
19+
m = Map(center=[0, 0], zoom=2)
20+
21+
22+
# Add a ScalelineControl to the map
23+
scaleline_control = ScaleLine()
24+
m.add_control(scaleline_control)
25+
26+
27+
# Display the map
28+
m
29+
30+
31+
32+
33+
Attributes
34+
----------
35+
36+
37+
.. autoclass:: ipyopenlayers.openlayers.ScaleLine
38+
:members:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Zoom Slider Control
2+
===================
3+
4+
5+
The Zoom Slider Control in `ipyopenlayers` provides a convenient slider interface for users to control the zoom level of the map.
6+
This control enhances the user experience by allowing a more intuitive and precise adjustment of the zoom level.
7+
8+
9+
Example
10+
-------
11+
12+
13+
.. jupyter-execute::
14+
15+
16+
from ipyopenlayers import Map, ZoomSlider
17+
18+
19+
# Create a map with initial zoom level and center coordinates
20+
m = Map(center=[0, 0], zoom=2)
21+
22+
23+
# Add a ZoomSlider control to the map
24+
zoom_slider = ZoomSlider()
25+
m.add_control(zoom_slider)
26+
27+
28+
# Display the map
29+
m
30+
31+
32+
33+
34+
Attributes
35+
----------
36+
37+
38+
.. autoclass:: ipyopenlayers.openlayers.ZoomSlider
39+
:members:
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"path": "../../../examples/introduction.ipynb"
2+
"path": "../../../examples/RasterLayer.ipynb"
33
}

docs/source/index.rst

+39-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
ipyopenlayers
32
=====================================
43

@@ -12,38 +11,61 @@ Quickstart
1211

1312
To get started with ipyopenlayers, install with pip::
1413

15-
pip install ipyopenlayers
14+
pip install ipyopenlayers
15+
16+
Contents
17+
--------
1618

17-
or with conda::
19+
.. toctree::
20+
:maxdepth: 2
21+
:caption: Installation and usage
1822

19-
conda install ipyopenlayers
23+
introduction
24+
installing
25+
develop-install
2026

27+
.. toctree::
28+
:maxdepth: 2
29+
:caption: Map
30+
31+
map/index
2132

22-
Contents
23-
--------
2433

2534
.. toctree::
26-
:maxdepth: 2
27-
:caption: Installation and usage
35+
:maxdepth: 2
36+
:caption: Layers and Overlays
2837

29-
installing
30-
introduction
38+
layers/index
39+
overlay/index
3140

3241
.. toctree::
33-
:maxdepth: 1
42+
:maxdepth: 2
43+
:caption: Controls
44+
3445

35-
examples/index
46+
controls/index
47+
48+
.. toctree::
49+
:maxdepth: 2
50+
:caption: API
3651

52+
api_reference/index
3753

3854
.. toctree::
39-
:maxdepth: 2
40-
:caption: Development
55+
:maxdepth: 1
4156

42-
develop-install
4357

58+
examples/index
59+
60+
61+
Indices and tables
62+
==================
63+
64+
* :ref:`genindex`
65+
* :ref:`modindex`
66+
* :ref:`search`
4467

4568
.. links
4669
4770
.. _`Jupyter widgets`: https://jupyter.org/widgets.html
48-
49-
.. _`notebook`: https://jupyter-notebook.readthedocs.io/en/latest/
71+
.. _`notebook`: https://jupyter-notebook.readthedocs.io/en/latest/

docs/source/installing.rst

+10-12
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,33 @@
1-
21
.. _installation:
32

43
Installation
54
============
65

6+
Installing using pip
7+
----------------------------------
78

89
The simplest way to install ipyopenlayers is via pip::
910

1011
pip install ipyopenlayers
1112

12-
or via conda::
13-
14-
conda install ipyopenlayers
15-
13+
Installing the Front-end Extension
14+
----------------------------------
1615

1716
If you installed via pip, and notebook version < 5.3, you will also have to
1817
install / configure the front-end extension as well. If you are using classic
1918
notebook (as opposed to Jupyterlab), run::
2019

2120
jupyter nbextension install [--sys-prefix / --user / --system] --py ipyopenlayers
22-
2321
jupyter nbextension enable [--sys-prefix / --user / --system] --py ipyopenlayers
2422

25-
with the `appropriate flag`_. If you are using Jupyterlab, install the extension
26-
with::
23+
with the `appropriate flag`_.
2724

28-
jupyter labextension install ipyopenlayers
25+
Installing for JupyterLab
26+
-------------------------
27+
28+
If you are using JupyterLab, install the extension with::
2929

30-
If you are installing using conda, these commands should be unnecessary, but If
31-
you need to run them the commands should be the same (just make sure you choose the
32-
`--sys-prefix` flag).
30+
jupyter labextension install ipyopenlayers
3331

3432

3533
.. links

docs/source/introduction.rst

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Introduction
33
=============
44

5-
.. todo::
5+
ipyopenlayers is a Jupyter widget for OpenLayers, a robust open-source JavaScript library for interactive mapping. This integration significantly enhances the capability to visualize GIS data, particularly enabling dynamic and real-time analysis of spatial information. By bringing OpenLayers' advanced mapping features into the Jupyter environment, ipyopenlayers empowers engineers, scientists, and analysts to perform spatial data exploration and analysis more efficiently and effectively.
66

7-
add prose explaining project purpose and usage here
7+
Every object in ipyopenlayers (including the Map, TileLayers, Layers, Controls, etc.) is interactive, allowing users to dynamically update attributes from Python or directly from the browser. This interactivity makes ipyopenlayers a powerful tool for creating sophisticated and responsive GIS applications within Jupyter notebooks.
8+
9+
Try it online
10+
-------------
11+
12+
You can try ipyopenlayers below, or open many other live examples in a new browser tab with : JupyterLite or RetroLite.

0 commit comments

Comments
 (0)