The FramedCloud popup throws an error if you attempt to call setContentHTML

before you add the popup to the map. To prevent this, don't call construct
or updateBlocks if relativePosition is null, to prevent this error message.
r=elemoine, (Pullup #1479)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6765 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2008-04-02 14:08:01 +00:00
parent f95f280dc7
commit 797c57586a
3 changed files with 33 additions and 3 deletions
+18
View File
@@ -0,0 +1,18 @@
<html>
<head>
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
function test_Popup_FramedCloud_setHTML(t) {
t.plan(1);
popup = new OpenLayers.Popup.FramedCloud();
popup.setContentHTML("<p></p>");
t.ok("setHTML on popup not yet added to map doesn't fail");
}
</script>
</head>
<body>
<div id="map" style="width:512px; height:256px"> </div>
</body>
</html>
+1
View File
@@ -40,6 +40,7 @@
<li>Popup.html</li>
<li>Popup/Anchored.html</li>
<li>Popup/AnchoredBubble.html</li>
<li>Popup/FramedCloud.html</li>
<li>Feature.html</li>
<li>Feature/Vector.html</li>
<li>Style.html</li>