<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Arial, sans-serif" size="2">
<div>I have searched through the forums on how to do this by using a container DIV when declaring my overviewmap control and then using the contentEl to put the overview div into my custom panel but it is still not working. With my below code for some reason
the overviewmap I have does go into the proper div but it is still directly above my Panel instead of inside it, can anyone assist on what I am doing wrong? Really appreciate it!</div>
<div><font color="#0000FF"> </font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> <font color="#0000FF">function</font> init()</font></div>
<div><font face="Courier New"> {</font></div>
<div><font face="Courier New"> // already defined map layers here</font></div>
<div><font face="Courier New" color="#008000"> </font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> map;</font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> <font color="#008000">// begin map defintion</font></font></div>
<div><font face="Courier New"> map = <font color="#0000FF">new</font> OpenLayers.Map(<font color="#A31515">'map'</font>,{controls: [],</font></div>
<div><font face="Courier New"> <font color="#008000">//scales: [974000,1867000,3300000,4450000,7075000,14513000,25769000,35654000,58981000,100000000],</font></font></div>
<div><font face="Courier New"> maxExtent: <font color="#0000FF">new</font> OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34),</font></div>
<div><font face="Courier New"> maxResolution: 156543.0399,</font></div>
<div><font face="Courier New"> numZoomLevels: 20,</font></div>
<div><font face="Courier New"> units: <font color="#A31515">'km'</font>,</font></div>
<div><font face="Courier New"> projection: <font color="#0000FF">new</font> OpenLayers.Projection(<font color="#A31515">"EPSG:900913"</font>),</font></div>
<div><font face="Courier New"> displayProjection: <font color="#0000FF">new</font> OpenLayers.Projection(<font color="#A31515">"EPSG:4326"</font>)</font></div>
<div><font face="Courier New"> }); <font color="#008000">//end of map definition </font></font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> container_overview = document.getElementById(<font color="#A31515">"overview"</font>);</font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> <font color="#008000">//Define options for overview Map</font></font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> options = {layers: [layer_Overview], units: <font color="#A31515">'km'</font>, maxExtent: <font color="#0000FF">new</font> </font></div>
<div><font face="Courier New"> OpenLayers.Bounds(-114.167163950302,52.0782516055391,-113.454306937636,52.4066932849551).transform(<font color="#0000FF">new</font> </font></div>
<div><font face="Courier New"> OpenLayers.Projection(<font color="#A31515">"EPSG:4326"</font>), <font color="#0000FF">new</font> </font></div>
<div><font face="Courier New"> OpenLayers.Projection(<font color="#A31515">"EPSG:900913"</font>)),</font></div>
<div><font face="Courier New"> numZoomLevels: 1,</font></div>
<div><font face="Courier New"> projection: <font color="#0000FF">new</font> OpenLayers.Projection(<font color="#A31515">"EPSG:900913"</font>),</font></div>
<div><font face="Courier New"> displayProjection: <font color="#0000FF">new</font> </font></div>
<div><font face="Courier New"> OpenLayers.Bounds(-114.167163950302,52.0782516055391,-113.454306937636,52.4066932849551).transform(<font color="#0000FF">new</font> </font></div>
<div><font face="Courier New"> OpenLayers.Projection(<font color="#A31515">"EPSG:4326"</font>), <font color="#0000FF">new</font> </font></div>
<div><font face="Courier New"> OpenLayers.Projection(<font color="#A31515">"EPSG:900913"</font>))}</font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> redgisOverview = <font color="#0000FF">new</font> OpenLayers.Control.OverviewMap({mapOptions: options, div: container_overview});</font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> <font color="#008000">//add Layers to map</font></font></div>
<div><font face="Courier New"> map.addLayers([layer_Section_Lines_Base, layer_Base]);</font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> <font color="#008000">//add controls to Map</font></font></div>
<div><font face="Courier New"> map.addControl(redgisOverview); <font color="#008000">// overview map</font></font></div>
<div><font face="Courier New" color="#008000"> </font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> <font color="#008000">//Define Map Longitude/Latitude and Start zoom levels</font></font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> startupLat = 52.27210;</font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> startupLon = -113.80288;</font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> startupLevel = 12;</font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> lonLat = <font color="#0000FF">new</font> OpenLayers.LonLat(startupLon,startupLat).transform(<font color="#0000FF">new</font> OpenLayers.Projection(<font color="#A31515">"EPSG:4326"</font>),
map.getProjectionObject());</font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> <font color="#008000">//Define Hidden MapPanl for use with GeoExt</font></font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> mapPanel = <font color="#0000FF">new</font> GeoExt.MapPanel({</font></div>
<div><font face="Courier New"> renderTo: <font color="#A31515">''</font>,</font></div>
<div><font face="Courier New"> height: 0,</font></div>
<div><font face="Courier New"> width: 0,</font></div>
<div><font face="Courier New"> map: map,</font></div>
<div><font face="Courier New"> title: <font color="#A31515">'A Simple GeoExt Map'</font></font></div>
<div><font face="Courier New"> <font color="#008000">//bbar: []</font></font></div>
<div><font face="Courier New"> });</font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> panel_Themes = <font color="#0000FF">new</font> Ext.Panel({</font></div>
<div><font face="Courier New"> collapsed: <font color="#0000FF">false</font>,</font></div>
<div><font face="Courier New"> html: <font color="#A31515">'This panel is not collapsed!'</font></font></div>
<div><font face="Courier New"> });</font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> panel_Legend = <font color="#0000FF">new</font> Ext.Panel({</font></div>
<div><font face="Courier New"> title:<font color="#A31515">'<center>Legend</center>'</font>,</font></div>
<div><font face="Courier New"> collapsed: <font color="#0000FF">false</font>,</font></div>
<div><font face="Courier New"> html: <font color="#A31515">'This panel is not collapsed!'</font></font></div>
<div><font face="Courier New"> });</font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> panel_Overview = <font color="#0000FF">new</font> Ext.Panel({</font></div>
<div><font face="Courier New"> title:<font color="#A31515">'<center>Overview Map</center>'</font>,</font></div>
<div><font face="Courier New"> collapsible: <font color="#0000FF">true</font>,</font></div>
<div><font face="Courier New"> collapsed: <font color="#0000FF">false</font>,</font></div>
<div><font face="Courier New"> applyTo:<font color="#A31515">'overview'</font>,</font></div>
<div><font face="Courier New"> contentEl: <font color="#A31515">'overview'</font>,</font></div>
<div><font face="Courier New"> height: 200</font></div>
<div><font face="Courier New"> });</font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> </font></div>
<div><font face="Courier New"> <font color="#0000FF">var</font> viewPort1 = <font color="#0000FF">new</font> Ext.Viewport({</font></div>
<div><font face="Courier New"> layout: <font color="#A31515">"border"</font>,</font></div>
<div><font face="Courier New"> items: [{</font></div>
<div><font face="Courier New"> region: <font color="#A31515">"center"</font>,</font></div>
<div><font face="Courier New"> id: <font color="#A31515">"mappanel"</font>,</font></div>
<div><font face="Courier New"> xtype: <font color="#A31515">"gx_mappanel"</font>,</font></div>
<div><font face="Courier New"> center: lonLat,</font></div>
<div><font face="Courier New"> zoom: startupLevel,</font></div>
<div><font face="Courier New"> map: map,</font></div>
<div><font face="Courier New"> split: <font color="#0000FF">true</font></font></div>
<div><font face="Courier New"> }, {</font></div>
<div><font face="Courier New"> region: <font color="#A31515">"east"</font>,</font></div>
<div><font face="Courier New"> contentEl: <font color="#A31515">"legend"</font>,</font></div>
<div><font face="Courier New"> width: 50,</font></div>
<div><font face="Courier New"> split: <font color="#0000FF">true</font>,</font></div>
<div><font face="Courier New"> collapsible: <font color="#0000FF">true</font>,</font></div>
<div><font face="Courier New"> collapseMode: <font color="#A31515">'mini'</font></font></div>
<div><font face="Courier New"> }, {</font></div>
<div><font face="Courier New"> region: <font color="#A31515">"west"</font>,</font></div>
<div><font face="Courier New"> title: <font color="#A31515">"<center>Themes</center>"</font>,</font></div>
<div><font face="Courier New"> contentEl: <font color="#A31515">"themes"</font>,</font></div>
<div><font face="Courier New"> width: 225,</font></div>
<div><font face="Courier New"> split: <font color="#0000FF">true</font>,</font></div>
<div><font face="Courier New"> collapsible: <font color="#0000FF">true</font>,</font></div>
<div><font face="Courier New"> collapseMode: <font color="#A31515">'mini'</font>,</font></div>
<div><font face="Courier New"> items: [panel_Themes, panel_Legend, panel_Overview]</font></div>
<div><font face="Courier New"> }]</font></div>
<div><font face="Courier New"> }); <font color="#008000">// End ext.OnReady</font></font></div>
<div><font face="Courier New" color="#008000"> </font></div>
<div><font face="Courier New" color="#008000"> </font></div>
<div><font face="Courier New" color="#008000"> </font></div>
<div><font face="Courier New">} <font color="#008000">// end of init function</font></font></div>
<div><font face="Courier New" color="#0000FF"></<font color="#A31515">script</font>></font></div>
<div><font face="Courier New" color="#0000FF"><<font color="#A31515">body</font><font color="#000000"> </font><font color="#FF0000">onload</font>="init();"></font></div>
<div><font face="Courier New"> <font color="#0000FF"><</font><font color="#A31515">div</font> <font color="#FF0000">id</font><font color="#0000FF">="themes"></font> </font></div>
<div><font face="Courier New"> <font color="#0000FF"></</font><font color="#A31515">div</font><font color="#0000FF">></font></font></div>
<div><font face="Courier New"> <font color="#0000FF"><</font><font color="#A31515">div</font> <font color="#FF0000">id</font><font color="#0000FF">="legend"></font> </font></div>
<div><font face="Courier New"> <font color="#0000FF"></</font><font color="#A31515">div</font><font color="#0000FF">></font></font></div>
<div><font face="Courier New"> <font color="#0000FF"><</font><font color="#A31515">div</font> <font color="#FF0000">id</font><font color="#0000FF">="tools"></font> </font></div>
<div><font face="Courier New"> <font color="#0000FF"></</font><font color="#A31515">div</font><font color="#0000FF">></font></font></div>
<div><font face="Courier New"> <font color="#0000FF"><</font><font color="#A31515">div</font> <font color="#FF0000">id</font><font color="#0000FF">="overview"></</font><font color="#A31515">div</font><font color="#0000FF">></font> </font></div>
<div><font face="Courier New"> <font color="#0000FF"></</font><font color="#A31515">body</font><font color="#0000FF">></font></font></div>
<div><font face="Courier New" color="#0000FF"></<font color="#A31515">html</font>></font></div>
<div><font face="Courier New" color="#0000FF"> </font></div>
<div><font face="Courier New"> </font></div>
<div> </div>
</font>
<DIV><P><HR>
This e-mail is intended for the original recipient(s) only. If you have received it in error, please advise the sender and delete this message.
</P></DIV>
</body>
</html>