Merge branch 'master' of github.com:openlayers/ol3 into vector

This commit is contained in:
Tim Schaub
2013-03-04 21:06:13 +01:00
66 changed files with 1187 additions and 275 deletions

View File

@@ -1,21 +1,14 @@
goog.require('goog.debug.Console');
goog.require('goog.debug.Logger');
goog.require('goog.debug.Logger.Level');
goog.require('ol.Collection');
goog.require('ol.Coordinate');
goog.require('ol.Map');
goog.require('ol.RendererHint');
goog.require('ol.View2D');
goog.require('ol.control.ScaleLineUnits');
goog.require('ol.layer.TileLayer');
goog.require('ol.projection');
goog.require('ol.source.TiledWMS');
if (goog.DEBUG) {
goog.debug.Console.autoInstall();
goog.debug.Logger.getLogger('ol').setLevel(goog.debug.Logger.Level.INFO);
}
var epsg4326 = ol.projection.getFromCode('EPSG:4326');
// We give the single image source a set of resolutions. This prevents the
@@ -47,6 +40,8 @@ var map = new ol.Map({
layers: layers,
// The OSgeo server does not set cross origin headers, so we cannot use WebGL
renderers: [ol.RendererHint.CANVAS, ol.RendererHint.DOM],
scaleLineControl: true,
scaleLineUnits: ol.control.ScaleLineUnits.DEGREES,
target: 'map',
view: new ol.View2D({
projection: epsg4326,

View File

@@ -15,6 +15,7 @@ var layer = new ol.layer.TileLayer({
var map = new ol.Map({
layers: new ol.Collection([layer]),
renderers: ol.RendererHints.createFromQueryData(),
scaleLineControl: true,
target: 'map',
view: new ol.View2D({
center: new ol.Coordinate(0, 0),

View File

@@ -1,4 +1,3 @@
goog.require('ol.BingMapsStyle');
goog.require('ol.Collection');
goog.require('ol.Coordinate');
goog.require('ol.Map');
@@ -14,7 +13,7 @@ var layers = new ol.Collection([
new ol.layer.TileLayer({
source: new ol.source.BingMaps({
key: 'AgtFlPYDnymLEe9zJ5PCkghbNiFZE9aAtTy3mPaEnEBXqLHtFuTcKoZ-miMC3w7R',
style: ol.BingMapsStyle.AERIAL
style: 'Aerial'
})
}),
new ol.layer.TileLayer({

View File

@@ -35,7 +35,7 @@
<title>wms capabilities example</title>
</head>
<body>
<div id="log"></div>
<pre id="log"></pre>
<div id="map">
<div id="text">
<h1 id="title">WMS GetCapabilities parsing example</h1>

View File

@@ -13,7 +13,8 @@ xhr.open('GET', url, true);
xhr.onload = function() {
if (xhr.status == 200) {
result = parser.read(xhr.responseXML);
document.getElementById('log').innerHTML = window.JSON.stringify(result);
document.getElementById('log').innerHTML =
window.JSON.stringify(result, undefined, 2);
}
};
xhr.send();