Move to-be-merged code into attic
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,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,42 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"id": "hello-epi",
|
||||
|
||||
"output-file": "hello-epi-compiled.js",
|
||||
|
||||
"inputs": [
|
||||
"hello-epi.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,16 @@
|
||||
/* 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();
|
||||
map.setContainer(goog.dom.getElement('map'));
|
||||
map.setLayers( [ new ol.layer.OSM() ] );
|
||||
map.setCenter( new ol.Loc(45, 5));
|
||||
map.setZoom(10);
|
||||
}
|
||||
window['init'] = init;
|
||||
@@ -0,0 +1,10 @@
|
||||
/* This is a code which is going to be compiled together with the library */
|
||||
|
||||
function init() {
|
||||
var map = ol.map()
|
||||
.renderTo('map')
|
||||
.layers([ol.layer.osm()])
|
||||
.center([45, 5])
|
||||
.zoom(10);
|
||||
}
|
||||
window['init'] = init;
|
||||
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
Adds the plovr generated script to the document. The following default
|
||||
values may be overridden with query string parameters:
|
||||
|
||||
* hostname - localhost
|
||||
* port - 9810
|
||||
* mode - SIMPLE
|
||||
* id - ol
|
||||
*/
|
||||
(function() {
|
||||
var search = window.location.search.substring(1);
|
||||
var params = {
|
||||
hostname: "localhost",
|
||||
port: "9810",
|
||||
mode: "SIMPLE",
|
||||
id: "ol"
|
||||
};
|
||||
var chunks = search.split("&");
|
||||
var pair;
|
||||
for (var i=chunks.length-1; i>=0; --i) {
|
||||
pair = chunks[i].split("=");
|
||||
params[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
|
||||
}
|
||||
|
||||
var host = params.hostname + ":" + params.port;
|
||||
delete params.hostname;
|
||||
delete params.port;
|
||||
|
||||
var pairs = [];
|
||||
for (var key in params) {
|
||||
pairs.push(encodeURIComponent(key) + "=" + encodeURIComponent(params[key]));
|
||||
}
|
||||
|
||||
var url = "http://" + host + "/compile?" + pairs.join("&");
|
||||
document.write("<script type='text/javascript' src='" + url + "'></script>");
|
||||
})();
|
||||
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>OL3 Map</title>
|
||||
<script type="text/javascript" src="loader.js"></script>
|
||||
<link rel="stylesheet" href="../css/ol.css" type="text/css">
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 512px; height: 350px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
<div id="map"></div>
|
||||
<script type="text/javascript" src="map.js"></script>
|
||||
</html>
|
||||
@@ -0,0 +1,6 @@
|
||||
var map = ol.map({
|
||||
renderTo: 'map',
|
||||
layers: [ol.layer.osm()],
|
||||
center: [0, 0],
|
||||
zoom: 1
|
||||
});
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Build configuration for the map.js example. Use following syntax:
|
||||
*
|
||||
* ol build map.json
|
||||
*
|
||||
* The output will be named map-compiled.js.
|
||||
*/
|
||||
|
||||
{
|
||||
"id": "hello",
|
||||
|
||||
"output-file": "map-compiled.js",
|
||||
|
||||
"inputs": ["../src/ol.js", "map.js"],
|
||||
|
||||
"paths": ["../src"],
|
||||
|
||||
"define": {
|
||||
"goog.DEBUG": false
|
||||
},
|
||||
|
||||
"mode": "ADVANCED",
|
||||
"level": "VERBOSE",
|
||||
|
||||
// acceptable values are "ERROR", "WARNING", and "OFF"
|
||||
"checks": {
|
||||
"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