diff --git a/examples/reprojection-by-code.html b/examples/reprojection-by-code.html index c4db7ec985..ab784c4607 100644 --- a/examples/reprojection-by-code.html +++ b/examples/reprojection-by-code.html @@ -1,10 +1,10 @@ --- template: example.html title: Reprojection with EPSG.io database search -shortdesc: Demonstrates client-side raster reprojection of MapQuest OSM to any projection +shortdesc: Demonstrates client-side raster reprojection of MapQuest OSM to arbitrary projection docs: > - This example shows client-side raster reprojection capabilities of - OpenLayers 3 from MapQuest OSM (EPSG:3857) to any projection by searching + This example shows client-side raster reprojection capabilities from + MapQuest OSM (EPSG:3857) to arbitrary projection by searching in EPSG.io database. tags: "reprojection, projection, proj4js, mapquest, epsg.io" resources: diff --git a/examples/reprojection-image.html b/examples/reprojection-image.html index f6ca664fb4..4b505605ad 100644 --- a/examples/reprojection-image.html +++ b/examples/reprojection-image.html @@ -1,11 +1,10 @@ --- template: example.html title: Image reprojection example -shortdesc: Demonstrates client-side reprojection of single image. +shortdesc: Demonstrates client-side reprojection of single image source. docs: > - This example shows client-side single-image reprojection capabilities of - OpenLayers 3. -tags: "reprojection, projection, proj4js, mapquest, image" + This example shows client-side reprojection of single image source. +tags: "reprojection, projection, proj4js, mapquest, image, imagestatic" resources: - http://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.6/proj4.js --- diff --git a/examples/reprojection-image.js b/examples/reprojection-image.js index 0143246cb1..fb58cacdc6 100644 --- a/examples/reprojection-image.js +++ b/examples/reprojection-image.js @@ -12,9 +12,7 @@ proj4.defs('EPSG:27700', '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 ' + '+x_0=400000 +y_0=-100000 +ellps=airy ' + '+towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 ' + '+units=m +no_defs'); -var extent = [0, 0, 700000, 1300000]; -var proj27700 = ol.proj.get('EPSG:27700'); -proj27700.setExtent(extent); +var imageExtent = [0, 0, 700000, 1300000]; var map = new ol.Map({ layers: [ @@ -26,15 +24,15 @@ var map = new ol.Map({ url: 'http://upload.wikimedia.org/wikipedia/commons/thumb/1/18/' + 'British_National_Grid.svg/2000px-British_National_Grid.svg.png', projection: 'EPSG:27700', - imageExtent: extent + imageExtent: imageExtent }) }) ], renderer: common.getRendererFromQueryString(), target: 'map', view: new ol.View({ - center: ol.proj.transform(ol.extent.getCenter(extent), - proj27700, 'EPSG:3857'), + center: ol.proj.transform(ol.extent.getCenter(imageExtent), + 'EPSG:27700', 'EPSG:3857'), zoom: 4 }) }); diff --git a/examples/reprojection.html b/examples/reprojection.html index 52ddf0d862..af09326e19 100644 --- a/examples/reprojection.html +++ b/examples/reprojection.html @@ -3,9 +3,8 @@ template: example.html title: Raster reprojection example shortdesc: Demonstrates client-side raster reprojection between various projections. docs: > - This example shows client-side raster reprojection capabilities of - OpenLayers 3 between various projections. -tags: "reprojection, projection, proj4js, mapquest, wms" + This example shows client-side raster reprojection between various projections. +tags: "reprojection, projection, proj4js, mapquest, wms, wmts, hidpi" resources: - http://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.6/proj4.js --- @@ -17,14 +16,14 @@ resources:
- + diff --git a/examples/reprojection.js b/examples/reprojection.js index fb0cf70d09..f6d05b1d43 100644 --- a/examples/reprojection.js +++ b/examples/reprojection.js @@ -31,11 +31,6 @@ proj4.defs('EPSG:5479', '+proj=lcc +lat_1=-76.66666666666667 +lat_2=' + var proj5479 = ol.proj.get('EPSG:5479'); proj5479.setExtent([6825737.53, 4189159.80, 9633741.96, 5782472.71]); -proj4.defs('EPSG:5041', '+proj=stere +lat_0=90 +lat_ts=90 +lon_0=0 +k=0.994 ' + - '+x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m +no_defs'); -var proj5041 = ol.proj.get('EPSG:5041'); -proj5041.setExtent([1994055.62, 5405875.53, 2000969.46, 2555456.55]); - proj4.defs('EPSG:21781', '+proj=somerc +lat_0=46.95240555555556 ' + '+lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel ' + '+towgs84=674.4,15.1,405.3,0,0,0,0 +units=m +no_defs'); @@ -60,7 +55,7 @@ proj54009.setExtent([-18e6, -9e6, 18e6, 9e6]); var layers = []; -layers['OS'] = new ol.layer.Tile({ +layers['bng'] = new ol.layer.Tile({ source: new ol.source.XYZ({ projection: 'EPSG:27700', url: 'https://googledrive.com/host/0B0bm2WdRuvICflNqUmxEdUNOV0ZRUFQ3cXNXR' + @@ -69,7 +64,7 @@ layers['OS'] = new ol.layer.Tile({ }) }); -layers['MapQuest'] = new ol.layer.Tile({ +layers['mapquest'] = new ol.layer.Tile({ source: new ol.source.MapQuest({layer: 'osm'}) }); @@ -150,8 +145,8 @@ layers['states'] = new ol.layer.Tile({ var map = new ol.Map({ layers: [ - layers['MapQuest'], - layers['OS'] + layers['mapquest'], + layers['bng'] ], renderer: common.getRendererFromQueryString(), target: 'map',