Commit ec5840db authored by Calvin Metcalf's avatar Calvin Metcalf
Browse files

remove more files

parent c8659e4a
Loading
Loading
Loading
Loading

demo/ProjPane.js

deleted100755 → 0
+0 −91
Original line number Diff line number Diff line
var panes = {
  mapL: {},
  mapLL: {},
  mapR: {}
};

ProjPane = Class.create();
ProjPane.prototype = {
  id: null,
  map: null,
  proj: null,

  initialize: function(pane, code) {
    this.id = pane;
    if (code) this.setProj(code);
  },

  updateCoords: function(coords) {
    document.getElementById(this.id+'_coords').innerHTML = coords.toString();
    var pt = this.map.getLayerPxFromLonLat(coords);
    this.marker.moveTo(pt);
  },

  setProj: function(code) {
    document.getElementById(this.id+'_proj').value = code; 

    this.proj = new Proj4js.Proj(code);
    var mapDef = Proj4js.maps[this.proj.srsCode];

    if (this.map) this.map.destroy();
    this.map = new OpenLayers.Map(this.id, mapDef.mapOptions);
    this.mapLayer = new OpenLayers.Layer.WMS(mapDef.layerName, mapDef.layerUrl, mapDef.layerParams, mapDef.layerOptions);
    this.map.addLayer(this.mapLayer);

    this.map.addLayer(new OpenLayers.Layer.Markers(''));
    this.marker = new OpenLayers.Marker(new OpenLayers.LonLat(0,0));
    this.map.layers[1].addMarker(this.marker);
    this.marker.map = this.map;
    if (window.bounds) {
      this.map.addLayer(new OpenLayers.Layer.Boxes());
      this.map.layers[2].addMarker(new OpenLayers.Marker.Box(bounds));
      this.map.setCenter(bounds.getCenterLonLat());
    } else {    
      this.map.zoomToMaxExtent();
    }    
    this.map.events.register('click', this.map, this.mapClicked.bind(this));

    document.getElementById(this.id+'_units').innerHTML = this.proj.units; 
    document.getElementById(this.id+'_title').innerHTML = this.proj.title; 
    document.getElementById(this.id+'_class').innerHTML = this.proj.projName; 
  },

  mapClicked: function(ev) { 
    var olc = this.map.getLonLatFromViewPortPx(ev.xy);
    c = new Proj4js.Point(olc.lon, olc.lat);
    this.updateCoords(c);
  
    if (this.opposite && this.opposite.proj) {
      var newCoords = this.proj.transform(c, this.opposite.proj);
      this.opposite.updateCoords(newCoords);
    }
    if (this.common) {
      var newCoords = this.proj.inverse(c);
      this.common.updateCoords(newCoords);
    }
    if (this.projected1 && this.projected1.proj) {
      var newCoords = this.projected1.proj.forward(c);
      this.projected1.updateCoords(newCoords);
    }
    if (this.projected2 && this.projected2.proj) {
      var newCoords = this.projected2.proj.forward(c);
      this.projected2.updateCoords(newCoords);
    }
  }
};


function init() {
  panes['mapLL'] = new ProjPane('mapLL',Proj4js.defaultDatum);
  panes['mapL'] = new ProjPane('mapL');
  panes['mapR'] = new ProjPane('mapR');

  panes['mapLL'].projected1 = panes['mapL'];
  panes['mapLL'].projected2 = panes['mapR'];
  panes['mapL'].opposite = panes['mapR'];
  panes['mapR'].opposite = panes['mapL'];
  panes['mapL'].common = panes['mapLL'];
  panes['mapR'].common = panes['mapLL'];

};

demo/base.css

deleted100755 → 0
+0 −22
Original line number Diff line number Diff line
#footer {
  margin-top: 20px;
  border-top: 1px solid #eee;
  padding: 10px;
}  
body {
 font-family:Verdana;
}
#header {
  background: #9D9FA1;
  color: #FFFFFF;
  font-family: "Trebuchet MS", Helvetica, Arial, sans-serif;
  font-size: 18px;
  text-shadow: 2px 2px 3px gray;
  height: 3em;
  padding: 4px 16px 0px 16px;
  vertical-align: top;
  margin:-10px -5px 0px -5px;
  border-bottom: 10px solid #e9eef9;
}
#header h1{margin-top: 0px;font-weight:normal;}
#navbar { background-color: #eee; margin: 0px -5px 10px -5px; padding: 10px;  }

demo/index.html

deleted100755 → 0
+0 −20
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>
  <link href="base.css" type="text/css" rel="stylesheet"/>
  <title>Proj4js Demonstration Page</title>
  <script src="http://openlayers.org/api/OpenLayers.js"></script>
  <script src="../lib/proj4js.js"></script>
  <script src="../lib/maps/EPSG27563.js"></script>
  <!--script src="../lib/defs/EPSG27563.js"></script-->
  <script src="ProjPane.js"></script>
</head>

<body onload="init()">
  <div id="header">
    <h1>Proj4js demo page</h1>
    <p>coming soon!</p>
  </div>

</body>
</html>
 No newline at end of file

demo/maps/EPSG27563.js

deleted100755 → 0
+0 −11
Original line number Diff line number Diff line
Proj4js.maps.EPSG27563 = {
  mapOptions: {
    projection: 'EPSG:27563',
    units: 'm', 
    maxResolution: 2000000/512
  },
  layerName: 'metacarta default',
  layerUrl: 'http://labs.metacarta.com/wms-c/Basic.py',
  layerParams: {'layers':'basic'},
  layerOptions: null
};

demo/maps/EPSG42304.js

deleted100755 → 0
+0 −12
Original line number Diff line number Diff line
Proj4js.maps.EPSG43204 = {
  mapOptions : {
    maxExtent: new OpenLayers.Bounds(-3631568.75,-1293815.5,4491139.5833333321,4937122), 
    scales: [50000000,23207944.16806,10772173.45016,5000000,2320794.41681,1077217.34502,500000,232079.44168,107721.7345,50000],
    units: 'm', 
    projection: 'EPSG:42304'
  },
  layerName: 'DM Solutions Demo',
  layerUrl: "http://localhost/cgi-bin/mapserv.exe?MAP=/ms4w/apps/gmap/htdocs/gmap75_wms.map",
  layerParams: {layers: "bathymetry,land_fn,park,drain_fn,drainage,prov_bound,fedlimit,rail,road,popplace", transparent: "false", format: "image/png" },
  layerOptions: {singleTile: true}
};