The demo of compilation with library in a different ways.
This commit is contained in:
@@ -25,7 +25,6 @@
|
|||||||
// "generateExports": true
|
// "generateExports": true
|
||||||
// },
|
// },
|
||||||
|
|
||||||
|
|
||||||
"checks": {
|
"checks": {
|
||||||
// acceptable values are "ERROR", "WARNING", and "OFF"
|
// acceptable values are "ERROR", "WARNING", and "OFF"
|
||||||
"accessControls": "WARNING",
|
"accessControls": "WARNING",
|
||||||
@@ -4,8 +4,7 @@
|
|||||||
"output-file": "hello-epi-compiled.js",
|
"output-file": "hello-epi-compiled.js",
|
||||||
|
|
||||||
"inputs": [
|
"inputs": [
|
||||||
"hello-epi.js",
|
"hello-epi.js"
|
||||||
"../src/ol.js"
|
|
||||||
],
|
],
|
||||||
"paths": [
|
"paths": [
|
||||||
"../src"
|
"../src"
|
||||||
+8
-2
@@ -1,8 +1,14 @@
|
|||||||
/* This is a code which is going to be compiled together with the library */
|
/* 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() {
|
function init() {
|
||||||
var map = new ol.Map()
|
var map = new ol.Map();
|
||||||
// .render('map')
|
map.setContainer(goog.dom.getElement('map'));
|
||||||
map.setLayers( [ new ol.layer.OSM() ] );
|
map.setLayers( [ new ol.layer.OSM() ] );
|
||||||
map.setCenter( new ol.Loc(45, 5));
|
map.setCenter( new ol.Loc(45, 5));
|
||||||
map.setZoom(10);
|
map.setZoom(10);
|
||||||
|
|||||||
+2
-2
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
var map = ol.map()
|
var map = ol.map()
|
||||||
.render('map')
|
.renderTo('map')
|
||||||
.layers([ol.layer.osm()])
|
.layers([ol.layer.osm()])
|
||||||
.center([45, 5])
|
.center([45, 5])
|
||||||
.zoom(10);
|
.zoom(10);
|
||||||
}
|
}
|
||||||
window['init'] = init;
|
window['init'] = init;
|
||||||
|
|||||||
Reference in New Issue
Block a user