The demo of compilation with library in a different ways.

This commit is contained in:
Petr Pridal
2012-06-22 14:48:49 +02:00
parent 07021d367b
commit 6f9f1783bd
5 changed files with 11 additions and 7 deletions

View File

@@ -25,7 +25,6 @@
// "generateExports": true
// },
"checks": {
// acceptable values are "ERROR", "WARNING", and "OFF"
"accessControls": "WARNING",

View File

@@ -4,8 +4,7 @@
"output-file": "hello-epi-compiled.js",
"inputs": [
"hello-epi.js",
"../src/ol.js"
"hello-epi.js"
],
"paths": [
"../src"

View File

@@ -1,8 +1,14 @@
/* This is a code which is going to be compiled together with the library */
goog.require('ol.Map');
goog.require('ol.layer.OSM');
goog.require('ol.Loc');
goog.require('goog.dom');
function init() {
var map = new ol.Map()
// .render('map')
var map = new ol.Map();
map.setContainer(goog.dom.getElement('map'));
map.setLayers( [ new ol.layer.OSM() ] );
map.setCenter( new ol.Loc(45, 5));
map.setZoom(10);

View File

@@ -2,9 +2,9 @@
function init() {
var map = ol.map()
.render('map')
.renderTo('map')
.layers([ol.layer.osm()])
.center([45, 5])
.zoom(10);
}
window['init'] = init;
window['init'] = init;