<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">There is a ticket already:<div><br></div><div><a href="http://trac.geoext.org/ticket/202">http://trac.geoext.org/ticket/202</a></div><div><br></div><div>The way I did it until now is:</div><div><br></div><div><div> addOverview: = function() {</div><div> var mapOptions = {</div><div> maxExtent: new OpenLayers.Bounds(180000, 397000,200000, 414000),</div><div> maxResolution: 500,</div><div> projection: "EPSG:28992",</div><div> units: "m"</div><div> };</div><div> var controlOptions = {</div><div> size: new OpenLayers.Size(150, 100),</div><div> div: Ext.get('overviewmap'),</div><div> mapOptions: mapOptions,</div><div> /* destroy issues in IE to be fixed, workaround for now */</div><div> destroy: function() {},</div><div> layers: [new OpenLayers.Layer.WMS("overview", GisArts.WMSOnlineResource, {map: GisArts.MapFileParameter, layers: 'gemeentegrens,topografie,straatnamen'}, {buffer: 0, ratio: 1, singleTile: true})]</div><div> };</div><div> var overview = new OpenLayers.Control.OverviewMap(controlOptions);</div><div> map.addControl(overview);</div><div> };</div><div><br></div><div>and then:</div><div><div> region: 'east',</div><div> xtype: 'panel',</div><div> layout: 'border',</div><div> listeners: {'afterlayout': {fn: addOverview, single: true}},</div><div> items: [</div></div><div>{xtype: 'panel', height: 150, title: 'Overzichtskaart', html: '<div id="overviewmap" style="width:100%;height:100%;"></div>', region: 'south'}</div><div>]</div><div><br></div><div>etc.</div></div><div><br></div><div>Best regards,</div><div>Bart</div><div><br><div><div>On Feb 23, 2010, at 7:06 PM, Matt Priour wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<div id="MailContainerBody" style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" leftmargin="0" topmargin="0" canvastabstop="true" name="Compose message area">
<div><font face="Arial" size="2">if you want an overview map in an extjs panel
separate from the main map panel, I'm fairly certain that you would need to
instead instantiate a new map panel with the overlay layers and hook up the main
map pan & zoom events to make appropriate changes to the overview
map.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">This may be a good idea for a new widget. If others
are interested in such functionality, I can file a ticket.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Matt Priour</font></div>
<div style="FONT: 10pt Tahoma">
<div><br></div>
<div style="BACKGROUND: #f5f5f5">
<div style="font-color: black"><b>From:</b> <a title="nik1166@googlemail.com" href="mailto:nik1166@googlemail.com">Nils Krueger</a> </div>
<div><b>Sent:</b> Tuesday, February 23, 2010 11:39 AM</div>
<div><b>To:</b> <a title="users@geoext.org" href="mailto:users@geoext.org">users@geoext.org</a> </div>
<div><b>Subject:</b> [Users] OverviewMap</div></div></div>
<div><br></div>Hello...<br><br>I would like to show the OverviewMap in an own
suitable panel display.<br>Unfortunately, it doesn’t work. If so, is there any
example? Or can anybody show me how to do this.<br><br>Thank you for your
help!<br><br>Nils<br><br><html><br><head><br>
<title>OverMap</title><br> <!--link
rel="stylesheet" type="text/css" href="<a href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css">http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css</a>"
/--><br> <link rel="stylesheet" type="text/css"
href="./lib/ext/resources/css/ext-all.css" /><br>
<br> <!--script type="text/javascript" src="<a href="http://extjs.cachefly.net/builds/ext-cdn-771.js">http://extjs.cachefly.net/builds/ext-cdn-771.js</a>"></script-->
<br> <script type="text/javascript"
src="./lib/ext/adapter/ext/ext-base.js"></script><br>
<script type="text/javascript"
src="./lib/ext/ext-all.js"></script><br>
<br> <script src="<a href="http://openlayers.org/api/2.8/OpenLayers.js">http://openlayers.org/api/2.8/OpenLayers.js</a>"></script><br><br>
<br> <script src="./lib/GeoExt/script/GeoExt.js"
type="text/javascript"></script><br><br><br>
<script type="text/javascript"><br> var panel,
map;<br> Ext.onReady(function(){<br>
<br> var options_31467 =
{<br>
projection: new
OpenLayers.Projection("EPSG:31467"),<br>
controls: [],
<br>
maxExtent: new OpenLayers.Bounds(3336848, 5208708, 3661609,
5575555),<br>
maxResolution: "auto",<br>
numZoomLevels:
20,<br>
units: 'm',<br>
};<br><br><br> // create a new
map<br> map = new
OpenLayers.Map('map', options_31467);<br>
<br> // create base layer
<br> var KreiseBW = new
OpenLayers.Layer.WMS(<br>
"KreiseBW",<br>
"/geoserver/wms",<br>
{<br>
layers: 'topp:KreiseBW',<br>
isBaseLayer:true,<br>
}<br>
<br>
);<br>
<br>
// create overview map<br> var ovMapLayer =
new OpenLayers.Layer.WMS(<br>
"Kreise", <br>
"/geoserver/wms", <br>
{<br>
layers: 'topp:BW',<br>
}<br> );<br>
<br> var ovMap =
{<br>
mapOptions:
{<br>
projection:
map.getProjection(),<br>
maxExtent:
map.getMaxExtent()<br>
},<br> layers:
[ovMapLayer]<br>
};<br> <br>
//add Layers<br>
map.addLayer(KreiseBW);<br>
<br> //add Controls<br>
map.addControl(new
OpenLayers.Control.LayerSwitcher());<br>
map.addControl(new OpenLayers.Control.Navigation());<br>
map.addControl(new
OpenLayers.Control.PanZoomBar({zoomWorldIcon: 'true'}));<br>
<br>
//map.addControl(new
OpenLayers.Control.OverviewMap(ovMap));<br>
<br>
map.zoomToMaxExtent();<br><br> //create
layout<br> var overmap = new
Ext.Panel({<br> title:
'Overmap',<br> //
???<br> control: new
OpenLayers.Control.OverviewMap(ovMap),<br>
//items: ovmap, <br>
height:150<br>
});<br><br> var toc = new
Ext.Panel({<br>
title:'TOC',<br> html:
'&lt;empty panel&gt;',<br>
cls:'empty'<br>
});<br>
<br> var west = new
Ext.Panel({<br>
region:'west',<br>
margins:'5 0 5
5',<br>
split:true,<br>
width:
210,<br>
layout:'accordion',<br>
items: [overmap, toc]<br>
});<br><br> var map_panel = new
GeoExt.MapPanel({<br>
region:'center',<br>
map: map,<br> });<br>
<br> var view = new
Ext.Viewport({<br>
layout:'border',<br>
items:[west,
map_panel]<br>
});<br> });<br>
</script><br></head><br><body><br></body><br></html><br><div>
<br class="webkit-block-placeholder"></div><hr><div><br class="webkit-block-placeholder"></div>_______________________________________________<br>Users mailing
list<br><a href="mailto:Users@geoext.org">Users@geoext.org</a><br>http://www.geoext.org/cgi-bin/mailman/listinfo/users<br></div>
_______________________________________________<br>Users mailing list<br><a href="mailto:Users@geoext.org">Users@geoext.org</a><br>http://www.geoext.org/cgi-bin/mailman/listinfo/users<br></blockquote></div><br></div></body></html>