Changeset 12491 in osm for applications
- Timestamp:
- 2008-12-22T21:33:27+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wmsplugin/resources/ymap.html
r11172 r12491 50 50 map.removeZoomScale(); 51 51 var zac = map.getBestZoomAndCenter(points); 52 var level = zac.zoomLevel; 53 54 // funny Yahoo bug seems to return 0 if your section is too small 55 if( level == 0 ) level = 1; 56 if (level>1) level--; 52 var level = zac.zoomLevel-1; 53 var levels = map.getZoomValidLevels(); 54 if(levels[0] > level) 55 level = levels[0]; 57 56 58 57 map.drawZoomAndCenter(zac.YGeoPoint,level); … … 62 61 xy1 = map.convertLatLonXY(points[1]); 63 62 64 // This is hack to bug in getBestZoomAndCenter function65 cx = map.convertXYLatLon(new YCoordPoint((xy0.x+xy1.x)/2 , (xy0.y+xy1.y)/2));63 // Recenter the stuff to have exact edges 64 cx = map.convertXYLatLon(new YCoordPoint((xy0.x+xy1.x)/2.0, (xy0.y+xy1.y)/2.0)); 66 65 map.drawZoomAndCenter(cx,level) 67 66
Note:
See TracChangeset
for help on using the changeset viewer.