Changeset 2121
- Timestamp:
- 11/28/07 17:52:00 (14 months ago)
- Location:
- lang/ruby/RubyESRIShape/test/shape-test
- Files:
-
- 3 added
- 2 modified
-
bnda_1_1.dbf (added)
-
make_prefs.rb (added)
-
sample/jsonp_map.html (modified) (1 diff)
-
sample/jsonp_map.js (modified) (4 diffs)
-
sample/pref_points.jsonp (added)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/RubyESRIShape/test/shape-test/sample/jsonp_map.html
r2115 r2121 22 22 font-weight: bold; 23 23 color: #000; 24 } 25 26 .pref-name { 27 display: block; 28 text-align: center; 29 width: 160px; 30 color: #666; 31 text-shadow: 1px 1px 2px #fff; 24 32 } 25 33 -
lang/ruby/RubyESRIShape/test/shape-test/sample/jsonp_map.js
r2118 r2121 4 4 5 5 var JSONP_files = [ 6 "./pref_points.jsonp", 6 7 "./japan_1.jsonp", 7 8 "./japan_2.jsonp", … … 18 19 ]; 19 20 20 var ShapeColors = {" bnda_1_1": "#897", "trans_rails": "#007", "transp_1_1": "#259"};21 var ShapeWidths = {" bnda_1_1": 0.5, "trans_rails": 1, "transp_1_1": 1};22 var ShapeFillColors = {" bnda_1_1": "#eeffe0", "trans_rails": null, "transp_1_1": null};21 var ShapeColors = {"pref_points": null, "bnda_1_1": "#897", "trans_rails": "#007", "transp_1_1": "#259"}; 22 var ShapeWidths = {"pref_points": null, "bnda_1_1": 0.5, "trans_rails": 1, "transp_1_1": 1}; 23 var ShapeFillColors = {"pref_points": null, "bnda_1_1": "#eeffe0", "trans_rails": null, "transp_1_1": null}; 23 24 24 25 var OUT; 25 26 var AirportIcon; 26 27 var AirportLabel; 28 var PrefLabel; 27 29 28 30 var Params; … … 184 186 if (sx < this.width && sx >= 0 && sy < this.height && sy >= 0) 185 187 { 186 this.g.drawImage(AirportIcon, Math.floor(sx) - 10, Math.floor(sy) - 10); 187 AirportLabel.create(dat.name, sx + 15, sy - 5, 10, "airport-name"); 188 if (ShapeName == "pref_points") 189 { 190 PrefLabel.create(dat.name, sx-80, sy - 5, 14, "pref-name"); 191 } 192 else 193 { 194 this.g.drawImage(AirportIcon, Math.floor(sx) - 10, Math.floor(sy) - 10); 195 AirportLabel.create(dat.name, sx + 15, sy - 5, 10, "airport-name"); 196 } 188 197 } 189 198 } … … 275 284 document.getElementById("theCanvas").style.background = "#f0f2ff"; 276 285 AirportLabel = new HTMLLabel(document.body, document.getElementById("theCanvas")); 286 PrefLabel = new HTMLLabel(document.body, document.getElementById("theCanvas")); 277 287 278 288 OUT = new DebugOut();
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)