Loading build/proj4js-openlayers.cfgdeleted 100755 → 0 +0 −16 Original line number Diff line number Diff line [first] OpenLayers/SingleFile.js OpenLayers/Console.js OpenLayers/BaseTypes.js OpenLayers/BaseTypes/Class.js OpenLayers/Util.js [last] [include] OpenLayers/Request.js OpenLayers/Request/XMLHttpRequest.js [exclude] Firebug/firebug.js Firebug/firebugx.js demo/index.html +2 −44 Original line number Diff line number Diff line Loading @@ -13,50 +13,8 @@ <body onload="init()"> <div id="header"> <h1>Proj4js demo page</h1> <p>This demo is nowhere near complete!</p> <p>coming soon!</p> </div> <div id="navbar"> <a href="http://svn.codehaus.org/mapbuilder/cscs">Proj4js</a> | <a href="http://communitymapbuilder.org/">MapBuilder</a> | <a href="http://openlayers.org/">OpenLayers</a> | <a href="http://spatialreference.org/">spatialreference.org</a> </div> <table id="content"> <tr><td class="projPane"> <h2>projection 1</h2> <div>Projection: <input type="text" id="mapL_proj" value="enter a proj code" onchange="panes['mapL'].setProj(this.value)"></input></div> <div>or select <select id="mapL_choice"> <option value="epsg:4905" onclick="panes['mapL'].setProj(this.value)">EPSG:4905</option> <option value="epsg:2957" onclick="panes['mapL'].setProj(this.value)">EPSG:2957</option> <option value="epsg:27563" onclick="panes['mapL'].setProj(this.value)">EPSG:27563</option> <option value="epsg:41001" onclick="panes['mapL'].setProj(this.value)">EPSG:41001</option> <option value="epsg:26912" onclick="panes['mapL'].setProj(this.value)">EPSG:26912</option> </select> </div> <div>Name: <span type="text" id="mapL_title"></span></div> <div>Class: <span type="text" id="mapL_class"></span></div> <div>Datum: <span type="text" id="mapL_datum"></span></div> <div>Coordinates: <span id="mapL_coords"></span> <span id="mapL_units"></span></div> <div id="mapL" style="width: 240px; height: 240px; float: right;"></div> </td><td class="projPane"> <h2>Common</h2> <div>Projection: <input type="text" id="mapLL_proj" value="Longitude/Latitude"/></div> <div>Name: <span type="text" id="mapLL_title"></span></div> <div>Class: <span type="text" id="mapLL_class"></span></div> <div>Datum: <span type="text" id="mapLL_datum"></span></div> <div>Coordinates: <span id="mapLL_coords"></span> <span id="mapLL_units"></span></div> <div id="mapLL" style="width: 240px; height: 240px; "/> </td><td class="projPane"> <h2>projection 2</h2> <div>Projection: <input type="text" id="mapR_proj" value="enter a proj code"/></div> <div>Name: <span type="text" id="mapR_title"></span></div> <div>Class: <span type="text" id="mapR_class"></span></div> <div>Datum: <span type="text" id="mapR_datum"></span></div> <div>Coordinates: <span id="mapR_coords"></span> <span id="mapR_units"></span></div> <div id="mapR" style="width: 240px; height: 240px;"/> </td> </tr> </table> </body> </html> No newline at end of file test/index.html +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ <head> <link href="base.css" type="text/css" rel="stylesheet"/> <title>Proj4js Test Page</title> <script src="../lib/proj4js-combined.js"></script> <script src="../lib/proj4js.js"></script> <script src="../lib/defs/EPSG42304.js"></script> <script src="../lib/defs/EPSG25833.js"></script> <script src="../lib/defs/EPSG27563.js"></script> Loading testDynaLoad.htmldeleted 100644 → 0 +0 −165 Original line number Diff line number Diff line <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Proj4js - dynamic loading</title> <style type="text/css"> @import url(test/base.css); #descSource, #descDest { font-style: italic; color: #999; } #xySource, #xyDest { width: 100%; } </style> <script src="lib/proj4js-combined.js"></script> <script src="lib/proj4js-openlayers.js"></script> <script src="lib/proj4js-dynamicLoad.js"></script> <script type="text/javascript"> Proj4js.proxyScript = 'proxy.php?url='; var testDefs = ["EPSG:4326","EPSG:42304","EPSG:25833","EPSG:27563","EPSG:4139","EPSG:4302","EPSG:31285","EPSG:900913"]; var projHash = {}; function initProj4js() { var crsSource = document.getElementById('crsSource'); var crsDest = document.getElementById('crsDest'); var optIndex = 0; for (var i in testDefs) { var def = testDefs[i]; projHash[def] = new Proj4js.Proj(def); //create a Proj for each definition var label = def+" - "+ (projHash[def].title ? projHash[def].title : ''); var opt = new Option(label, def); crsSource.options[optIndex]= opt; var opt = new Option(label, def); crsDest.options[optIndex]= opt; ++optIndex; } // for updateCrs('Source'); updateCrs('Dest'); } function updateCrs(id) { var crs = document.getElementById('crs'+id); if (crs.value) { var proj = projHash[crs.value]; var str = 'projection: ' + proj.projName + ' - datum: ' + proj.datumName; var desc = document.getElementById('desc'+id); desc.innerHTML = str; var units = document.getElementById('units'+id); units.innerHTML = proj.units; } } function transform() { var crsSource = document.getElementById('crsSource'); var projSource = null; if (crsSource.value) { projSource = projHash[crsSource.value]; } else { alert("Select a source coordinate system"); return; } var crsDest = document.getElementById('crsDest'); var projDest = null; if (crsDest.value) { projDest = projHash[crsDest.value]; } else { alert("Select a destination coordinate system"); return; } var pointInput = document.getElementById('xySource'); if (pointInput.value) { var pointSource = new Proj4js.Point(pointInput.value); var pointDest = Proj4js.transform(projSource, projDest, pointSource); document.getElementById('xyDest').value = pointDest.toShortString(); } else { alert("Enter source coordinates"); return; } } </script> </head> <body onload="initProj4js()"> <div id="header"> <h1>Proj4js Home Page</h1> </div> <div id="navbar"> <a href="http://trac.osgeo.org/proj4js">Proj4js Wiki/Trac</a> | <a href="http://wiki.osgeo.org/wiki/MetaCRS">OSGeo MetaCRS</a> | <a href="http://spatialreference.org/">spatialreference.org</a> | <a href="http://communitymapbuilder.org/">MapBuilder</a> | <a href="http://openlayers.org/">OpenLayers</a> | </div> <h1>Welcome to Proj4js</h1> <p> This is a JavaScript library that provides methods for coordinate transformations between map projections and longitude/latitude, including datum transformations, in a web client. </p> <p> To use the Proj4js, you first create a source and destination Proj4js.Proj objects, passing in a projection code (e.g. EPSG:4326). You can then use the Proj4js.transform() method, passing in map XY as a point object and the source and destination projection objects, and it returns the point coordinate in the destination projection. </p> <form> <table> <tbody> <tr> <th colspan="3">source</th> <th></th> <th colspan="3">dest</th> </tr> <tr> <td>CRS:</td> <td colspan="2"> <select name="crsSource" id="crsSource" onchange="updateCrs('Source')"> <option value selected="selected">Select a CRS</option> </select> </td> <td></td> <td>CRS:</td> <td colspan="2"> <select name="crsDest" id="crsDest" onchange="updateCrs('Dest')"> <option value selected="selected">Select a CRS</option> </select> </td> </tr> <tr> <td></td> <td colspan="2" id="descSource">Projection - datum</td> <td></td> <td></td> <td colspan="2" id="descDest">Projection - datum</td> </tr> <tr> <td>x,y</td> <td><input name="xySource" id="xySource" type="text"/></td> <td id="unitsSource">units</td> <td><input type="button" value="--> transform -->" onclick="transform();"/></td> <td>x,y</td> <td><input name="xyDest" id="xyDest" type="text"></td> <td id="unitsDest">units</td> </tr> <tr> <td colspan="7" align="center"><input type="reset" value="reset"/></td> </tr> </tbody> </table> </form> <p> For more information on Proj4js and to report bugs, please visit the <a href="http://trac.osgeo.org/proj4js">Proj4js Trac and Wiki</a> at OSGeo. </p> </body> </html> No newline at end of file Loading
build/proj4js-openlayers.cfgdeleted 100755 → 0 +0 −16 Original line number Diff line number Diff line [first] OpenLayers/SingleFile.js OpenLayers/Console.js OpenLayers/BaseTypes.js OpenLayers/BaseTypes/Class.js OpenLayers/Util.js [last] [include] OpenLayers/Request.js OpenLayers/Request/XMLHttpRequest.js [exclude] Firebug/firebug.js Firebug/firebugx.js
demo/index.html +2 −44 Original line number Diff line number Diff line Loading @@ -13,50 +13,8 @@ <body onload="init()"> <div id="header"> <h1>Proj4js demo page</h1> <p>This demo is nowhere near complete!</p> <p>coming soon!</p> </div> <div id="navbar"> <a href="http://svn.codehaus.org/mapbuilder/cscs">Proj4js</a> | <a href="http://communitymapbuilder.org/">MapBuilder</a> | <a href="http://openlayers.org/">OpenLayers</a> | <a href="http://spatialreference.org/">spatialreference.org</a> </div> <table id="content"> <tr><td class="projPane"> <h2>projection 1</h2> <div>Projection: <input type="text" id="mapL_proj" value="enter a proj code" onchange="panes['mapL'].setProj(this.value)"></input></div> <div>or select <select id="mapL_choice"> <option value="epsg:4905" onclick="panes['mapL'].setProj(this.value)">EPSG:4905</option> <option value="epsg:2957" onclick="panes['mapL'].setProj(this.value)">EPSG:2957</option> <option value="epsg:27563" onclick="panes['mapL'].setProj(this.value)">EPSG:27563</option> <option value="epsg:41001" onclick="panes['mapL'].setProj(this.value)">EPSG:41001</option> <option value="epsg:26912" onclick="panes['mapL'].setProj(this.value)">EPSG:26912</option> </select> </div> <div>Name: <span type="text" id="mapL_title"></span></div> <div>Class: <span type="text" id="mapL_class"></span></div> <div>Datum: <span type="text" id="mapL_datum"></span></div> <div>Coordinates: <span id="mapL_coords"></span> <span id="mapL_units"></span></div> <div id="mapL" style="width: 240px; height: 240px; float: right;"></div> </td><td class="projPane"> <h2>Common</h2> <div>Projection: <input type="text" id="mapLL_proj" value="Longitude/Latitude"/></div> <div>Name: <span type="text" id="mapLL_title"></span></div> <div>Class: <span type="text" id="mapLL_class"></span></div> <div>Datum: <span type="text" id="mapLL_datum"></span></div> <div>Coordinates: <span id="mapLL_coords"></span> <span id="mapLL_units"></span></div> <div id="mapLL" style="width: 240px; height: 240px; "/> </td><td class="projPane"> <h2>projection 2</h2> <div>Projection: <input type="text" id="mapR_proj" value="enter a proj code"/></div> <div>Name: <span type="text" id="mapR_title"></span></div> <div>Class: <span type="text" id="mapR_class"></span></div> <div>Datum: <span type="text" id="mapR_datum"></span></div> <div>Coordinates: <span id="mapR_coords"></span> <span id="mapR_units"></span></div> <div id="mapR" style="width: 240px; height: 240px;"/> </td> </tr> </table> </body> </html> No newline at end of file
test/index.html +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ <head> <link href="base.css" type="text/css" rel="stylesheet"/> <title>Proj4js Test Page</title> <script src="../lib/proj4js-combined.js"></script> <script src="../lib/proj4js.js"></script> <script src="../lib/defs/EPSG42304.js"></script> <script src="../lib/defs/EPSG25833.js"></script> <script src="../lib/defs/EPSG27563.js"></script> Loading
testDynaLoad.htmldeleted 100644 → 0 +0 −165 Original line number Diff line number Diff line <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Proj4js - dynamic loading</title> <style type="text/css"> @import url(test/base.css); #descSource, #descDest { font-style: italic; color: #999; } #xySource, #xyDest { width: 100%; } </style> <script src="lib/proj4js-combined.js"></script> <script src="lib/proj4js-openlayers.js"></script> <script src="lib/proj4js-dynamicLoad.js"></script> <script type="text/javascript"> Proj4js.proxyScript = 'proxy.php?url='; var testDefs = ["EPSG:4326","EPSG:42304","EPSG:25833","EPSG:27563","EPSG:4139","EPSG:4302","EPSG:31285","EPSG:900913"]; var projHash = {}; function initProj4js() { var crsSource = document.getElementById('crsSource'); var crsDest = document.getElementById('crsDest'); var optIndex = 0; for (var i in testDefs) { var def = testDefs[i]; projHash[def] = new Proj4js.Proj(def); //create a Proj for each definition var label = def+" - "+ (projHash[def].title ? projHash[def].title : ''); var opt = new Option(label, def); crsSource.options[optIndex]= opt; var opt = new Option(label, def); crsDest.options[optIndex]= opt; ++optIndex; } // for updateCrs('Source'); updateCrs('Dest'); } function updateCrs(id) { var crs = document.getElementById('crs'+id); if (crs.value) { var proj = projHash[crs.value]; var str = 'projection: ' + proj.projName + ' - datum: ' + proj.datumName; var desc = document.getElementById('desc'+id); desc.innerHTML = str; var units = document.getElementById('units'+id); units.innerHTML = proj.units; } } function transform() { var crsSource = document.getElementById('crsSource'); var projSource = null; if (crsSource.value) { projSource = projHash[crsSource.value]; } else { alert("Select a source coordinate system"); return; } var crsDest = document.getElementById('crsDest'); var projDest = null; if (crsDest.value) { projDest = projHash[crsDest.value]; } else { alert("Select a destination coordinate system"); return; } var pointInput = document.getElementById('xySource'); if (pointInput.value) { var pointSource = new Proj4js.Point(pointInput.value); var pointDest = Proj4js.transform(projSource, projDest, pointSource); document.getElementById('xyDest').value = pointDest.toShortString(); } else { alert("Enter source coordinates"); return; } } </script> </head> <body onload="initProj4js()"> <div id="header"> <h1>Proj4js Home Page</h1> </div> <div id="navbar"> <a href="http://trac.osgeo.org/proj4js">Proj4js Wiki/Trac</a> | <a href="http://wiki.osgeo.org/wiki/MetaCRS">OSGeo MetaCRS</a> | <a href="http://spatialreference.org/">spatialreference.org</a> | <a href="http://communitymapbuilder.org/">MapBuilder</a> | <a href="http://openlayers.org/">OpenLayers</a> | </div> <h1>Welcome to Proj4js</h1> <p> This is a JavaScript library that provides methods for coordinate transformations between map projections and longitude/latitude, including datum transformations, in a web client. </p> <p> To use the Proj4js, you first create a source and destination Proj4js.Proj objects, passing in a projection code (e.g. EPSG:4326). You can then use the Proj4js.transform() method, passing in map XY as a point object and the source and destination projection objects, and it returns the point coordinate in the destination projection. </p> <form> <table> <tbody> <tr> <th colspan="3">source</th> <th></th> <th colspan="3">dest</th> </tr> <tr> <td>CRS:</td> <td colspan="2"> <select name="crsSource" id="crsSource" onchange="updateCrs('Source')"> <option value selected="selected">Select a CRS</option> </select> </td> <td></td> <td>CRS:</td> <td colspan="2"> <select name="crsDest" id="crsDest" onchange="updateCrs('Dest')"> <option value selected="selected">Select a CRS</option> </select> </td> </tr> <tr> <td></td> <td colspan="2" id="descSource">Projection - datum</td> <td></td> <td></td> <td colspan="2" id="descDest">Projection - datum</td> </tr> <tr> <td>x,y</td> <td><input name="xySource" id="xySource" type="text"/></td> <td id="unitsSource">units</td> <td><input type="button" value="--> transform -->" onclick="transform();"/></td> <td>x,y</td> <td><input name="xyDest" id="xyDest" type="text"></td> <td id="unitsDest">units</td> </tr> <tr> <td colspan="7" align="center"><input type="reset" value="reset"/></td> </tr> </tbody> </table> </form> <p> For more information on Proj4js and to report bugs, please visit the <a href="http://trac.osgeo.org/proj4js">Proj4js Trac and Wiki</a> at OSGeo. </p> </body> </html> No newline at end of file