Add a readme
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ol",
|
"name": "ol",
|
||||||
"version": "3.20.0-beta.1",
|
"version": "3.21.0-beta.1",
|
||||||
"description": "OpenLayers",
|
"description": "OpenLayers",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# `ol`
|
||||||
|
|
||||||
|
[OpenLayers](https://openlayers.org/) for CommonJS module loaders.
|
||||||
|
|
||||||
|
**Note: This is still a work in progress. Not yet ready for production.**
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Add the `ol` package as a dependency to your project.
|
||||||
|
|
||||||
|
npm install ol@beta --save
|
||||||
|
|
||||||
|
Require just what you need for your application:
|
||||||
|
|
||||||
|
```js
|
||||||
|
var OLMap = require('ol/Map');
|
||||||
|
var View = require('ol/View');
|
||||||
|
var TileLayer = require('ol/layer/Tile');
|
||||||
|
var OSM = require('ol/source/OSM');
|
||||||
|
|
||||||
|
var map = new OLMap({
|
||||||
|
target: 'map',
|
||||||
|
layers: [
|
||||||
|
new TileLayer({
|
||||||
|
source: new OSM()
|
||||||
|
})
|
||||||
|
],
|
||||||
|
view: new View({
|
||||||
|
center: [0, 0],
|
||||||
|
zoom: 2
|
||||||
|
})
|
||||||
|
});
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user