Non-functioning example

When loading this example in compiled mode, the page displays the following:

    ol3 proj4js demo

    [object Object][object Object]

With `mode=RAW`, it does display some numbers, but I think we could better explain this functionality with a different sort of tutorial/example.
This commit is contained in:
Tim Schaub
2012-09-29 01:12:40 +02:00
parent 71547c6e48
commit c24e520961
2 changed files with 0 additions and 36 deletions

View File

@@ -1,13 +0,0 @@
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="../css/ol.css" type="text/css">
<script src="http://svn.osgeo.org/metacrs/proj4js/trunk/lib/proj4js-compressed.js" type="text/javascript"></script>
<title>ol3 proj4js demo</title>
</head>
<body>
<h1>ol3 proj4js demo</h1>
<div id="output"></div>
<script src="loader.js?id=proj4js" type="text/javascript"></script>
</body>
</html>

View File

@@ -1,23 +0,0 @@
goog.require('goog.dom');
goog.require('ol.Coordinate');
goog.require('ol.Projection');
var outputElement = document.getElementById('output');
var point, transformedPoint;
point = new ol.Coordinate(-626172.13571216376, 6887893.4928337997);
transformedPoint = ol.Projection.transformWithCodes(
point, 'GOOGLE', 'WGS84');
outputElement.appendChild(goog.dom.createTextNode(transformedPoint.toString()));
Proj4js.defs['EPSG:21781'] =
'+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 ' +
'+x_0=600000 +y_0=200000 +ellps=bessel ' +
'+towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs';
point = new ol.Coordinate(7.439583333333333, 46.95240555555556);
transformedPoint = ol.Projection.transformWithCodes(
point, 'EPSG:4326', 'EPSG:21781');
outputElement.appendChild(goog.dom.createTextNode(transformedPoint.toString()));