[OpenLayers-Commits] r11710 - in sandbox/august/trunk: . examples
lib lib/OpenLayers
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Wed Mar 16 12:13:54 EDT 2011
Author: augusttown
Date: 2011-03-16 09:13:53 -0700 (Wed, 16 Mar 2011)
New Revision: 11710
Modified:
sandbox/august/trunk/
sandbox/august/trunk/examples/dynamic-text-layer.html
sandbox/august/trunk/lib/OpenLayers.js
sandbox/august/trunk/lib/OpenLayers/Events.js
sandbox/august/trunk/lib/OpenLayers/Layer.js
Log:
Property changes on: sandbox/august/trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/openlayers:10329-10354,10357-10502,10504-11704
+ /trunk/openlayers:10329-10354,10357-10502,10504-11709
Modified: sandbox/august/trunk/examples/dynamic-text-layer.html
===================================================================
--- sandbox/august/trunk/examples/dynamic-text-layer.html 2011-03-16 16:05:53 UTC (rev 11709)
+++ sandbox/august/trunk/examples/dynamic-text-layer.html 2011-03-16 16:13:53 UTC (rev 11710)
@@ -41,7 +41,13 @@
// Needed only for interaction, not for the display.
function onPopupClose(evt) {
// 'this' is the popup.
- selectControl.unselect(this.feature);
+ var feature = this.feature;
+ if (feature.layer) { // The feature is not destroyed
+ selectControl.unselect(feature);
+ } else { // After "moveend" or "refresh" events on POIs layer all
+ // features have been destroyed by the Strategy.BBOX
+ this.destroy();
+ }
}
function onFeatureSelect(evt) {
feature = evt.feature;
@@ -53,7 +59,7 @@
null, true, onPopupClose);
feature.popup = popup;
popup.feature = feature;
- map.addPopup(popup);
+ map.addPopup(popup, true);
}
function onFeatureUnselect(evt) {
feature = evt.feature;
Modified: sandbox/august/trunk/lib/OpenLayers/Events.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Events.js 2011-03-16 16:05:53 UTC (rev 11709)
+++ sandbox/august/trunk/lib/OpenLayers/Events.js 2011-03-16 16:13:53 UTC (rev 11710)
@@ -854,7 +854,18 @@
clearMouseCache: function() {
this.element.scrolls = null;
this.element.lefttop = null;
- this.element.offsets = null;
+ // OpenLayers.Util.pagePosition needs to use
+ // element.getBoundingClientRect to correctly calculate the offsets
+ // for the iPhone, but once the page is scrolled, getBoundingClientRect
+ // returns incorrect offsets. So our best bet is to not invalidate the
+ // offsets once we have them, and hope that the page was not scrolled
+ // when we did the initial calculation.
+ if (!((document.body.scrollTop != 0 ||
+ document.body.scrollLeft != 0) &&
+ navigator.userAgent.match(/iPhone/i))) {
+ OpenLayers.Console.log("clear");
+ this.element.offsets = null;
+ }
},
/**
Modified: sandbox/august/trunk/lib/OpenLayers/Layer.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer.js 2011-03-16 16:05:53 UTC (rev 11709)
+++ sandbox/august/trunk/lib/OpenLayers/Layer.js 2011-03-16 16:13:53 UTC (rev 11710)
@@ -1322,7 +1322,8 @@
if (this.wrapDateLine) {
// wrap around the date line, within the limits of rounding error
var wrappingOptions = {
- 'rightTolerance':this.getResolution()
+ 'rightTolerance':this.getResolution(),
+ 'leftTolerance':this.getResolution()
};
bounds = bounds.wrapDateLine(this.maxExtent, wrappingOptions);
Modified: sandbox/august/trunk/lib/OpenLayers.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers.js 2011-03-16 16:05:53 UTC (rev 11709)
+++ sandbox/august/trunk/lib/OpenLayers.js 2011-03-16 16:13:53 UTC (rev 11710)
@@ -93,7 +93,7 @@
* OpenLayers library code as it will be appended at the end of this file.
*/
if(!singleFile) {
- var jsfiles = new Array(
+ var jsFiles = new Array(
"OpenLayers/BaseTypes/Class.js",
"OpenLayers/Util.js",
"OpenLayers/BaseTypes.js",
More information about the Commits
mailing list