posts - 41,  comments - 90,  trackbacks - 0
OpenLayers.Layer.Google
#2493: Google layer instances with overridden methods may need to be modified, because some methods are now mixed in from OpenLayers.Layer.Google.v2. Affected API methods are
onMapResize,
getMapObjectBoundsFromOLBounds,
setMapObjectCenter,
dragPanMapObject,
getMapObjectLonLatFromMapObjectPixel,
getMapObjectPixelFromMapObjectLonLat,
getMapObjectZoomFromMapObjectBounds,
getMapObjectLonLatFromLonLat and getMapObjectPixelFromXY.
This means that when calling any of these methods on the prototype, the code needs to be changed to call it on OpenLayers.Layer.Google.v2 instead. You would e.g. have to change
OpenLayers.Layer.Google.prototype.onMapResize.apply(this, arguments);
to
OpenLayers.Layer.Google.v2.onMapResize.apply(this, arguments);
OpenLayers.Control.Panel
#2764: OpenLayers.Control.Panel does not change the active state of controls with a type of OpenLayers.Control.TYPE_BUTTON any more. If you want to retain the old behavior, create your panel with an overridden activateControl method like this:
var panel = new OpenLayers.Control.Panel({ activateControl: function(control) { OpenLayers.Control.Panel.prototype.activateControl.apply(this, arguments); if (control.active && control.type == OpenLayers.Control.TYPE_TOOL) { for (var i=panel.controls.length-1; i>=0; --i) { panel.controls[i].type == OpenLayers.Control.TYPE_BUTTON && panel.controls[i].deactivate(); } } }
});
New Addins
InlineXhtml - adds support for WMS layers with SVG as image format, for SVG enabled browsers.
posted on 2010-09-13 12:22 天狼 阅读(521) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: