Changeset 11172 in osm for applications/editors/josm/plugins/wmsplugin
- Timestamp:
- 2008-10-13T16:38:49+02:00 (16 years ago)
- Location:
- applications/editors/josm/plugins/wmsplugin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wmsplugin/resources/ymap.html
r11085 r11172 2 2 <head> 3 3 <script type="text/javascript"> 4 //var bbox = ""; 5 //var width = 800; 6 //var height = 800; 7 8 // Parse query string and set variables 9 var url = location.href; 4 // Parse query string and set variables 5 var url = location.href; 10 6 var queryStringPos = url.indexOf("?"); 11 7 if( queryStringPos != -1 ) 12 8 { 13 9 url = url.substring(queryStringPos + 1); 14 10 var variables = url.split ("&"); 15 11 for (i = 0; i < variables.length; i++) 16 12 { 17 18 13 if( !variables[i] ) 14 continue; 19 15 var keyValue = variables[i].split("="); 20 16 eval ('var '+keyValue[0].toLowerCase()+'="'+keyValue[1]+'"'); … … 25 21 dump("YWMS ERROR: no queryString\n"); 26 22 } 27 28 // Limit size to current window's, to avoid memory problems29 //width = Math.min(width, screen.width);30 //height = Math.min(height, screen.height);31 32 23 </script> 33 24 <script type="text/javascript" src="http://api.maps.yahoo.com/ajaxymap?v=3.8&appid=z7qRk3_V34HAbY_SkC7u7GAgG5nDTblw.cuL1OS5LWGwkIIUeGjg4qsnJDPpmhoF"></script> 34 25 </head> 35 26 36 27 <body style="margin: 0px"> 37 28 <div id="map"></div> … … 60 51 var zac = map.getBestZoomAndCenter(points); 61 52 var level = zac.zoomLevel; 62 53 63 54 // funny Yahoo bug seems to return 0 if your section is too small 64 55 if( level == 0 ) level = 1; … … 74 65 cx = map.convertXYLatLon(new YCoordPoint((xy0.x+xy1.x)/2, (xy0.y+xy1.y)/2)); 75 66 map.drawZoomAndCenter(cx,level) 76 67 77 68 // Create a new size for the map. This makes the need of clipping the image unnecessary. 78 69 new_width = Math.abs( xy0.x - xy1.x); 79 70 new_height = Math.abs( xy0.y - xy1.y); 80 71 81 72 // Apply the new width-height 73 map.resizeTo( new YSize(new_width, new_height)); 82 74 mapDiv.style.width = new_width; 83 75 mapDiv.style.height = new_height; 84 map.resizeTo( new YSize(new_width, new_height));85 76 window.moveTo(0,0); 86 77 window.resizeTo(new_width, new_height); 87 88 89 90 /*91 /// DEBUG: colour the interesting area92 var cPT2 = new YGeoPoint(tllat, tllon);93 var cPT3 = new YGeoPoint(tllat, brlon);94 var cPT4 = new YGeoPoint(brlat, brlon);95 var cPT5 = new YGeoPoint(brlat, tllon);96 // args: array of pts, color, width, alpha97 var poly1 = new YPolyline([cPT2,cPT3,cPT4,cPT5, cPT2],'blue',7,0.7);98 map.addOverlay(poly1);99 */100 78 } 101 79 </script> -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java
r11084 r11172 73 73 public WMSLayer(String name, String baseURL) { 74 74 super(name); 75 b oolean background = true;75 background = true; /* set global background variable */ 76 76 initializeImages(); 77 77 this.baseURL = baseURL;
Note:
See TracChangeset
for help on using the changeset viewer.