Hello world for various modes of compilation.
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<title>OL3 Hello World</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
|
||||||
|
<link rel="stylesheet" href="../css/ol.css" type="text/css">
|
||||||
|
<script src="../api.js"></script>
|
||||||
|
<style type="text/css" media="screen">
|
||||||
|
html, body, #map { width: 100%; height: 100%; border: 0; margin:0; }
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript" charset="utf-8">
|
||||||
|
var map;
|
||||||
|
function init() {
|
||||||
|
map = ol.map()
|
||||||
|
.renderTo('map')
|
||||||
|
.layers([ol.layer.osm()])
|
||||||
|
.center([45, 5])
|
||||||
|
.zoom(10);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body onload="init()">
|
||||||
|
<div id="map"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
/* This is a code which is going to be compiled together with the library */
|
||||||
|
|
||||||
|
function init() {
|
||||||
|
var map = new ol.Map()
|
||||||
|
// .render('map')
|
||||||
|
map.setLayers( [ new ol.layer.OSM() ] );
|
||||||
|
map.setCenter( new ol.Loc(45, 5));
|
||||||
|
map.setZoom(10);
|
||||||
|
}
|
||||||
|
window['init'] = init;
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"id": "hello-epi",
|
||||||
|
|
||||||
|
"output-file": "hello-epi-compiled.js",
|
||||||
|
|
||||||
|
"inputs": [
|
||||||
|
"hello-epi.js",
|
||||||
|
"../src/ol.js"
|
||||||
|
],
|
||||||
|
"paths": [
|
||||||
|
"../src"
|
||||||
|
],
|
||||||
|
|
||||||
|
"define": {
|
||||||
|
// "goog.dom.ASSUME_STANDARDS_MODE": true,
|
||||||
|
"goog.DEBUG": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"mode": "ADVANCED",
|
||||||
|
"level": "VERBOSE",
|
||||||
|
// "pretty-print": true,
|
||||||
|
// "debug": true,
|
||||||
|
|
||||||
|
// "experimental-compiler-options": {
|
||||||
|
// "generateExports": true
|
||||||
|
// },
|
||||||
|
|
||||||
|
|
||||||
|
"checks": {
|
||||||
|
// acceptable values are "ERROR", "WARNING", and "OFF"
|
||||||
|
"accessControls": "WARNING",
|
||||||
|
"visibility": "WARNING",
|
||||||
|
"checkTypes": "WARNING",
|
||||||
|
"checkRegExp": "WARNING",
|
||||||
|
"checkVars": "WARNING",
|
||||||
|
"deprecated": "WARNING",
|
||||||
|
"fileoverviewTags": "WARNING",
|
||||||
|
"invalidCasts": "WARNING",
|
||||||
|
"missingProperties": "WARNING",
|
||||||
|
"nonStandardJsDocs": "WARNING",
|
||||||
|
"undefinedVars": "WARNING"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<title>OL3 Hello World</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
|
||||||
|
<script src="hello-compiled.js"></script>
|
||||||
|
<style type="text/css" media="screen">
|
||||||
|
html, body, #map { width: 100%; height: 100%; border: 0; margin:0; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body onload="init()">
|
||||||
|
<div id="map"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
/* This is a code which is going to be compiled together with the library */
|
||||||
|
|
||||||
|
function init() {
|
||||||
|
var map = ol.map()
|
||||||
|
.render('map')
|
||||||
|
.layers([ol.layer.osm()])
|
||||||
|
.center([45, 5])
|
||||||
|
.zoom(10);
|
||||||
|
}
|
||||||
|
window['init'] = init;
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"id": "hello",
|
||||||
|
|
||||||
|
"output-file": "hello-compiled.js",
|
||||||
|
|
||||||
|
"inputs": [
|
||||||
|
"hello.js",
|
||||||
|
"../src/ol.js"
|
||||||
|
],
|
||||||
|
"paths": [
|
||||||
|
"../src"
|
||||||
|
],
|
||||||
|
|
||||||
|
"define": {
|
||||||
|
// "goog.dom.ASSUME_STANDARDS_MODE": true,
|
||||||
|
"goog.DEBUG": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"mode": "ADVANCED",
|
||||||
|
"level": "VERBOSE",
|
||||||
|
// "pretty-print": true,
|
||||||
|
// "debug": true,
|
||||||
|
|
||||||
|
// "experimental-compiler-options": {
|
||||||
|
// "generateExports": true
|
||||||
|
// },
|
||||||
|
|
||||||
|
|
||||||
|
"checks": {
|
||||||
|
// acceptable values are "ERROR", "WARNING", and "OFF"
|
||||||
|
"accessControls": "WARNING",
|
||||||
|
"visibility": "WARNING",
|
||||||
|
"checkTypes": "WARNING",
|
||||||
|
"checkRegExp": "WARNING",
|
||||||
|
"checkVars": "WARNING",
|
||||||
|
"deprecated": "WARNING",
|
||||||
|
"fileoverviewTags": "WARNING",
|
||||||
|
"invalidCasts": "WARNING",
|
||||||
|
"missingProperties": "WARNING",
|
||||||
|
"nonStandardJsDocs": "WARNING",
|
||||||
|
"undefinedVars": "WARNING"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user