<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hey Everyone,<br>
<br>
I just wanted to let anyone interested in taking on the Popup issue
(looks like <em>rdewit</em> is stepping up based on the ticket #926
feedback) of my findings in trying to implement CouldAmbers codebase
with the current trunk. BTW- Thanks CloudAmber for getting us so far
along on this!<br>
<br>
I started with their code base and did the following:<br>
<ol>
  <li>Split the code into three files that work with the current OL
trunk. CloudAmber's seem to use an older version of class construction.</li>
  <li>Improved the ShiftMap function [now called ShiftMapThinker()
which calls ShiftMapWorker()] so that map could be placed anywhere on
the screen and the panning would still work. Some of CloudAmbers
original calculations were dependent on the browsers windows width/left
position and wouldn't work quite right if the map were floated to the
right, etc.<br>
  </li>
  <li>Created an intermediate function [ShiftMapThinker()] to
predetermine the map panning interval amounts based on the
SlideAnimationTime divided by the SlideTimerInterval. The way it is
currently implemented in their sandbox isn't really true to that
concept, as the multiple map pans generally take longer than the
SlideTimerInterval. My intermediate function creates the map pan action
plan and then executes it, saving us from potential freak outcomes
(like almost making it to the destination location, but then your
anti-virus software scans a file and then the timer gets out of wack
and the map is sent to Tahiti).</li>
  <li>The map pan is executed by a simple recursive function [ShiftMapWorker()]
that pans both X and Y directions simultaneously and in the process
times itself out. The current sandbox implementation pans X and Y
separately, resulting in entirely too many map pans to get the job
done... and a lot of the time continues to run after the panning has
stopped... why I don't know.<br>
  </li>
  <li>A memory leak that seems to exist in the old classes is removed,
as now the popup object itself is not copied recursively to pan the map
and because X and Y are panned at the same time. <br>
  </li>
  <li>In IE7 if the first tag element is a div and it is set to
"float:left" and the OpenLayers div is within it but set to
"float:right" like in the (example below) the scrollWidth would be
zero. It seems that IE7 doesn't want to allow anything left of screen
left (like setting your off-screen rendered popup to
"left:-99999999px") -- Firefox of course doesn't have this problem...
Creating a parent div for the off-screen rendering and setting it to
"float:none" fixes the problem. <br>
  </li>
</ol>
The following is a link where you can find an app with the popups alive:<br>
<a class="moz-txt-link-freetext" href="http://199.20.64.48/ags/arcgis/server/appTests/OL/popup_georss/">http://199.20.64.48/ags/arcgis/server/appTests/OL/popup_georss/</a><br>
<br>
The code can found here:<br>
<a class="moz-txt-link-freetext" href="http://199.20.64.48/ags/arcgis/server/appTests/OL/popup_georss/openlayers/lib/OpenLayers/Popup_dg.js">http://199.20.64.48/ags/arcgis/server/appTests/OL/popup_georss/openlayers/lib/OpenLayers/Popup_dg.js</a><br>
<a class="moz-txt-link-freetext" href="http://199.20.64.48/ags/arcgis/server/appTests/OL/popup_georss/openlayers/lib/OpenLayers/Popup/Anchored_dg.js">http://199.20.64.48/ags/arcgis/server/appTests/OL/popup_georss/openlayers/lib/OpenLayers/Popup/Anchored_dg.js</a><br>
<a class="moz-txt-link-freetext" href="http://199.20.64.48/ags/arcgis/server/appTests/OL/popup_georss/openlayers/lib/OpenLayers/Popup/AnchoredBubble_dg.js">http://199.20.64.48/ags/arcgis/server/appTests/OL/popup_georss/openlayers/lib/OpenLayers/Popup/AnchoredBubble_dg.js</a><br>
<br>
I noticed that in the ticket there were some complaints about
overriding the original functionality of popups. This code still does
that.<br>
<br>
If anyone is interested in pursuing this, send me an email. Even if new
code is created for the popup classes, I would like help out where I
can.<br>
<br>
Thanks,<br>
Dejung<br>
<br>
<div class="moz-signature">-- <br>
<font color="#000000"><b>Dejung Gewissler</b></font><br>
New Jersey Office of Information Technology<br>
<font color="#006600">Office of Geographic Information Systems</font><br>
200 Riverview Plaza<br>
PO Box 212, Trenton, NJ 08625-0212<br>
<br>
609.777.3754
</div>
</body>
</html>