Updated Use Cases (markdown)

tschaub
2013-03-23 11:26:30 -07:00
parent 3757e121fd
commit 415e8cbf3e

@@ -4,17 +4,11 @@ These use cases describe common scenarios for loading, rendering, and editing ve
### Load data once from static file
User has a static file (e.g. GeoJSON) hosted on the same origin as their application. User expects data to be loaded and rendered over a raster tile based layer (e.g. WMS). Data may be in a different coordinate reference system than map.
User has a static file (e.g. GeoJSON) hosted on the same origin as their application. User expects data to be loaded and rendered in the map projection.
**Alternative 1**
```js
var raster = new ol.layer.TileLayer({
source: new ol.source.TiledWMS({
url: 'http://demo.opengeo.org/geoserver/wms',
params: {'LAYERS': 'topp:states', 'TILED': true}
})
});
// assume features.json is a FeatureCollection in EPSG:4326
var vector = new ol.layer.Vector({
@@ -28,7 +22,7 @@ var vector = new ol.layer.Vector({
var map = new ol.Map({
target: 'map',
layers: [raster, vector],
layers: [vector],
view: new ol.View2D({
projection: 'EPSG:1234',
center: ol.projection.transform(