Skip to content

Commit

Permalink
Fix instanciation of Ol3Cesium in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gberaudo committed Feb 25, 2015
1 parent a67f4fe commit 6c25023
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ Applications using this OL3-Cesium distribution also need to load OpenLayers and

An OpenLayers map can be switched to a 3d globe view by running the code below after the map has been created:
```js
var ol3d = new olcs.OLCesium(map); // map is the ol.Map instance
var ol3d = new olcs.OLCesium({map: map}); // map is the ol.Map instance
ol3d.setEnabled(true);
```
The above will use the WGS84 ellipsoid all around the globe. To use terrain, simply add a [terrain provider](http://cesiumjs.org/Cesium/Build/Documentation/TerrainProvider.html) using the Cesium API (can be your own, but in the snippet below it's one that ships with Cesium):
```js
var ol3d = new olcs.OLCesium(map); // map is the ol.Map instance
var ol3d = new olcs.OLCesium({map: map}); // map is the ol.Map instance
var scene = ol3d.getCesiumScene();
var terrainProvider = new Cesium.CesiumTerrainProvider({
url: '//cesiumjs.org/stk-terrain/tilesets/world/tiles'
Expand Down

0 comments on commit 6c25023

Please sign in to comment.