@@ -136,19 +139,20 @@ Managing geographical models with the GeoAlchemy backend
****
If you want to store spatial information in a GIS database, Flask-Admin has
you covered. The `GeoAlchemy`_ backend extends the SQLAlchemy backend (just as
you covered. The `GeoAlchemy <http://geoalchemy-2.readthedocs.org/>`_ backend
extends the SQLAlchemy backend (just as
GeoAlchemy extends SQLAlchemy) to give you a pretty and functional map-based
editor for your admin pages.
Some notable features include:
- Maps are displayed using the amazing `Leaflet`_ Javascript library,
with map data from `Mapbox`_.
- Maps are displayed using the amazing `Leaflet <http://leafletjs.com/>`_ Javascript library,
with map data from `Mapbox <https://www.mapbox.com/>`_.
- Geographic information, including points, lines and polygons, can be edited
interactively using `Leaflet.Draw`_.
- Graceful fallback: `GeoJSON`_ data can be edited in a ``<textarea>``, if the
interactively using `Leaflet.Draw <https://github.com/Leaflet/Leaflet.draw>`_.
- Graceful fallback: `GeoJSON <http://geojson.org/>`_ data can be edited in a ``<textarea>``, if the
user has turned off Javascript.
- Works with a `Geometry`_ SQL field that is integrated with `Shapely`_ objects.
- Works with a `Geometry <http://geoalchemy-2.readthedocs.org/en/latest/types.html#geoalchemy2.types.Geometry>`_ SQL field that is integrated with `Shapely <http://toblerity.org/shapely/>`_ objects.
To get started, define some fields on your model using GeoAlchemy's *Geometry*
field. An then, add model views to your interface using the ModelView class
...
...
@@ -174,8 +178,8 @@ to get started.
Loading Tiles From Mapbox
**************************************
To have map data display correctly, you'll have to sign up for a Mapbox account and
include some credentials in your application's config::
To have map data display correctly, you'll have to sign up for an account at https://www.mapbox.com/
and include some credentials in your application's config::
app = Flask(__name__)
app.config['MAPBOX_MAP_ID'] = "example.abc123"
...
...
@@ -193,17 +197,6 @@ There's currently no way to sort, filter, or search on geometric fields
in the admin. It's not clear that there's a good way to do so.
If you have any ideas or suggestions, make a pull request!