Changeset 12780 in osm for applications/editors/josm/plugins/openlayers/resources/yahoo.html
- Timestamp:
- 2009-01-01T18:55:45+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/openlayers/resources/yahoo.html
r8748 r12780 1 1 <html xmlns="http://www.w3.org/1999/xhtml"> 2 2 <head> 3 3 <!-- The map can not be set to 100%. It hangs --> 4 4 <style type="text/css"> 5 5 #map { … … 11 11 <script type="text/javascript" src="http://www.openlayers.org/api/OpenLayers.js"></script> 12 12 <script type="text/javascript"> 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 13 // There seems to be a problem with this function and the Java JS engine, as the computed style 14 // does not have the function getPropertyValue. 15 OpenLayers.Element.getStyle = function(element, style) { 16 element = OpenLayers.Util.getElement(element); 17 var value = element.style[OpenLayers.String.camelize(style)]; 18 if (!value) { 19 if (document.defaultView && 20 document.defaultView.getComputedStyle && false) { 21 22 var css = document.defaultView.getComputedStyle(element, null); 23 value = css ? css.getPropertyValue(style) : null; 24 } else if (element.currentStyle) { 25 value = element.currentStyle[OpenLayers.String.camelize(style)]; 26 } 27 } 28 29 var positions = ['left', 'top', 'right', 'bottom']; 30 if (window.opera && 31 (OpenLayers.Util.indexOf(positions,style) != -1) && 32 (OpenLayers.Element.getStyle(element, 'position') == 'static')) { 33 value = 'auto'; 34 } 35 36 return value == 'auto' ? null : value; 37 } 38 38 </script> 39 39 <script type="text/javascript"> … … 56 56 var mapDiv = document.getElementById("map"); 57 57 if( !mapDiv ) return; 58 58 59 59 mapDiv.style.width = width; 60 60 mapDiv.style.height = height; 61 61 62 62 if( map ) 63 63 map.updateSize(); 64 64 } 65 65 66 66 function zoomMapToExtent(left, bottom, right, top) 67 67 { 68 68 if( !map ) return; 69 69 70 70 map.zoomToExtent( new OpenLayers.Bounds(left, bottom, right, top) ); 71 71 var extent = map.getExtent(); … … 78 78 </script> 79 79 </head> 80 80 81 81 <body onload="init()" style="overflow:hidden; margin: 0; padding: 0;"> 82 82 <div id="overlay" style="background:white;opacity:0.5;z-index:10;">
Note:
See TracChangeset
for help on using the changeset viewer.