Changes for README.md: 103 added lines, 0 removed lines.
Original line number
Diff line number
Diff line
# Views GeoJSON
## Table of contents
- Summary
- Requirements
- Installation
- Usage
- Bounding Box Support
- To Do
- Credits
- Current Maintainers
## Summary
Views GeoJSON is a style plugin for Views to deliver location-specific data in GeoJSON format, see [RFC 7946: The GeoJSON Format](view-source:https://www.rfc-editor.org/rfc/rfc7946).
Each row is output as a GeoJSON "Features" including geospatial data and optional metadata. All features are wrapped in a "Feature Collection" object.
Changes for README.txt: 0 added lines, 104 removed lines.
Original line number
Diff line number
Diff line
CONTENTS OF THIS FILE
---------------------
* Summary
* Requirements
* Installation
* Usage
* Bounding Box Support
* To Do
* Credits
* Current Maintainers
SUMMARY
-------
Views GeoJSON is a style plugin for Views to deliver location-specific data in GeoJSON format, (see GeoJSON spec: http://geojson.org/geojson-spec.html).
Each row is output as a GeoJSON "Features" including geospatial data and optional metadata. All features are wrapped in a "Feature Collection" object.
REQUIREMENTS
------------
Drupal modules:
* Views
* Serialization
* Rest
Optional Drupal modules:
* Geofield 8.x-1.0-alpha2 or greater
INSTALLATION
------------
Install the module as usual.
See https://www.drupal.org/node/1897420 for help installing Drupal 8 modules.
USAGE
-----
1. Create a View with a Feed display on content with geospatial data.
2. Add fields to output a Geofield, longitude & latitude or WKT.
3. Optionally add fields for name and description.
4. Set Format for the display to "GeoJSON Feed".
5. In the "Style options" for this format:
* Choose Map Data Source (Other: Lat/Lon Point, Geofield, etc.)
* Assign the fields that represent Latitude and Longitude.
* Optionally choose fields representing name and description for each point.
* Optionally set a JSONP prefix, (see http://en.wikipedia.org/wiki/JSONP).
* Set the Content-type header to be sent. The default is "application/json",
the standard MIME type for JSON, per http://www.ietf.org/rfc/rfc4627.txt.
6. If using with the OpenLayers module, your new GeoJSON layer will be available
as an Overlay layer on the "Layers & Styles" tab when editing your map.
Bounding Box Filtering
--------------------
GeoJSON views can accept a bounding box as an argument to return only the
points within that box.
It has been tested with OpenLayers' Bounding Box Strategy but should work
with any mapping tool that requests bounding box coordinates as
"?bbox=left,bottom,right,top" in the query string. Argument ID "bbox" is
default for OpenLayers but can be changed.
OpenLayers 7.x-2.x-dev is currently required for OpenLayers BBOX integration.
See OpenLayers issue http://drupal.org/node/1493344, "Support BBOX strategy in