跳转到主要内容

在您的django项目中使用GeoNode客户端

项目描述

# geonode-client [![构建状态](https://travis-ci.org/GeoNode/geonode-client.svg?branch=master)](https://travis-ci.org/GeoNode/geonode-client) [![代码气候](https://codeclimate.com/github/GeoNode/geonode-viewer/badges/gpa.svg)](https://codeclimate.com/github/GeoNode/geonode-viewer) [![测试覆盖率](https://codeclimate.com/github/GeoNode/geonode-viewer/badges/coverage.svg)](https://codeclimate.com/github/GeoNode/geonode-viewer/coverage)

OL3 - GeoNode的React地图查看器

## 安装

安装 nodenpm。我们鼓励您使用[nvm](https://github.com/creationix/nvm)作为node版本管理器。

您需要 node > 5

运行 npm install 以安装所有依赖项。

## 开发服务器

运行 npm start 以启动开发服务器。在浏览器中访问 https://:8080 以查看结果。

## 测试

在开发过程中,运行 npm run test:watch 以在每次文件更改时运行测试。

运行 npm test 以运行完整的测试套件并生成代码覆盖率报告。

## 构建过程

构建是通过 webpack 完成的,命令是 npm build。dist 文件夹用于存储这些文件的压缩版本。

## 部署到 GH-pages

为 master 分支启用了通过 travis 的自动化部署。

如果您想手动部署到 gh-pages,请使用 npm run deploy

### 重要提醒 部署使用 index-gh.html,请确保此文件与 index.html 保持同步,并在仓库更改名称后更改路径。同样需要更改 .travis.yml 文件。

## 集成到 GeoNode/Django

django-geonode-client 添加到您的 requirements.txt 文件中,并将 geonode-client 添加到您的 INSTALLED_APPS 中。

### 对于 GeoNode,将 LAYER_PREVIEW_LIBRARY 修改为 react

### 对于 Django,我们添加了可以在模板中使用的 templatetags

{% client_viewer_js %} 添加到模板中以包含查看器 JavaScript,将 {% client_composer_js %} 添加到模板中以包含作曲家 JavaScript

以下模板可供使用:client_map_view_html 用于完整地图视图,client_map_detail_view_html 用于较小的地图视图(如地图预览),client_map_new_html 用于使用作曲家创建新地图,client_layer_map_html 用于图层预览的较小地图视图。

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。

源分布

django-geonode-client-1.0.9.tar.gz (6.7 MB 查看散列值)

上传日期

由以下机构支持

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