跳转到主要内容

在Geodjango和Leaflet上创建协作地图。

项目描述

[![构建状态](https://travis-ci.org/umap-project/django-leaflet-storage.svg)](https://travis-ci.org/umap-project/django-leaflet-storage)
[![需求状态](https://requires.io/github/umap-project/django-leaflet-storage/requirements.svg?branch=master)](https://requires.io/github/umap-project/django-leaflet-storage/requirements/?branch=master)

# Django-Leaflet-Storage

为您的Django项目提供协作地图。

Django-Leaflet-Storage是建立在[Leaflet.Storage](https://github.com/yohanboniface/Leaflet.Storage)之上的后端,基于[Geodjango](http://geodjango.org/)和[Leaflet](https://leaflet.npmjs.net.cn)。

请在此处查看演示[http://umap.fluv.io](http://umap.fluv.io)


## 安装

您需要一个地理感知数据库。有关后端安装,请参阅[Geodjango文档](https://docs.django.ac.cn/en/dev/ref/contrib/gis/install/)。

然后,您可以安装此应用程序

pip install django-leaflet-storage


将 `leaflet_storage` 添加到您的应用程序

INSTALLED_APPS = (
...
"leaflet_storage",
)

包含 `leaflet_storage` urls

(r'', include('leaflet_storage.urls')),

创建表

python manage.py migrate


## 基本用法

从Django管理界面(目前),您需要至少创建以下内容

- 一个瓦片图层实例
- 一个许可实例

然后,转到地图创建页面(例如https://127.0.0.1:8017/map/new),您将能够添加功能(标记、多边形等)。

由以下机构支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面