<div dir="ltr">Ah! That was the problem.<br>Thank you very much.<br><br>Regards, Kenneth.<br><br><br><div class="gmail_quote">2008/9/2 Andrew de Klerk <span dir="ltr"><<a href="mailto:andrew.deklerk@gmail.com">andrew.deklerk@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Does your map div have a style with width and height set? - i.e.<br>
<br>
#map{<br>
width:500px;<br>
height:500px;<br>
border:1px solid;<br>
}<br>
<br>
Other than that, I We have placed ours in a table before - so that should<br>
not be a problem. I may be missing something, but your code looks ok<br>
<br>
The div is a normal html div so you should be able to position it through<br>
styles<br>
<div><div></div><div class="Wj3C7c"><br>
-----Original Message-----<br>
From: <a href="mailto:users-bounces@openlayers.org">users-bounces@openlayers.org</a> [mailto:<a href="mailto:users-bounces@openlayers.org">users-bounces@openlayers.org</a>] On<br>
Behalf Of kejster<br>
Sent: 02 September 2008 08:21 PM<br>
To: <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>
Subject: [OpenLayers-Users] Putting map-div in a table won't work<br>
<br>
<br>
I am very new to Openlayers, so I thought I would play around with one of<br>
the<br>
examples (the Google with overlay one).<br>
<br>
I can get that to work OK, but then I though I'd try to position the div<br>
where the map is show.<br>
<br>
I tried two ways: using a stylesheet ( #map { position: ...... ) and a<br>
table.<br>
<br>
Neither of these things work. I just see a blank page.<br>
<br>
Below is my code for the one I did with the table.<br>
<br>
Can anyone tell me if I'm just doing something wrong, or does OpenLayers not<br>
allow you to mess with the position of it's div?<br>
<br>
------------------------------------------<br>
<br>
<html xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>"><br>
<head><br>
<title>Untitled Page</title><br>
<script<br>
src='<a href="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ" target="_blank">http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGe<br>
m0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ</a>'></scri<br>
pt><br>
<script src="JavaScript/OpenLayers.js"></script><br>
<script type="text/javascript"><br>
var map;<br>
function init(){<br>
map = new OpenLayers.Map('map');<br>
var satellite = new OpenLayers.Layer.Google(<br>
"Google Satellite" , {type: G_SATELLITE_MAP}<br>
);<br>
var wms = new OpenLayers.Layer.WMS(<br>
"World Map",<br>
"<a href="http://world.freemap.in/cgi-bin/mapserv" target="_blank">http://world.freemap.in/cgi-bin/mapserv</a>",<br>
{<br>
map: '/www/<a href="http://freemap.in/world/map/factbooktrans.map" target="_blank">freemap.in/world/map/factbooktrans.map</a>',<br>
transparent: 'TRUE',<br>
layers: 'factbook'<br>
},<br>
{'reproject': true}<br>
);<br>
map.addLayers([satellite, wms]);<br>
map.setCenter(new OpenLayers.LonLat(10.205188,48.857593), 5);<br>
map.addControl( new OpenLayers.Control.LayerSwitcher() );<br>
}<br>
</script><br>
</head><br>
<body onload="init();"><br>
<table><br>
<tr><br>
<td>Some text</td><br>
</tr><br>
<tr><br>
<td><br>
<div id="map"></div><br>
</td><br>
</tr><br>
</table><br>
</body><br>
</html><br>
<br>
--<br>
View this message in context:<br>
<a href="http://n2.nabble.com/Putting-map-div-in-a-table-won%27t-work-tp834581p834581.html" target="_blank">http://n2.nabble.com/Putting-map-div-in-a-table-won%27t-work-tp834581p834581<br>
.html</a><br>
Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
</div></div>No virus found in this incoming message.<br>
Checked by AVG - <a href="http://www.avg.com" target="_blank">http://www.avg.com</a><br>
Version: 8.0.169 / Virus Database: 270.6.14/1647 - Release Date: 9/2/2008<br>
6:02 AM<br>
<div><div></div><div class="Wj3C7c"><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Med venlig hilsen / Best regards,<br><br>Kenneth Johnsen.<br>
</div>