[Users] Add overview map to mappanel

Robert Buckley robertdbuckley at yahoo.com
Wed Feb 22 17:26:39 CET 2012


Hi,

I actually got it working...but....due to the fact that my basemaps come from geowebcache, the resolution is the same as the map...ie...too big for an overviewmap.

How could I use an image to do this?...does this possibility exist?

yours,

Rob


________________________________
 Von: Robert Buckley <robertdbuckley at yahoo.com>
An: Andrew Stewart <Andrew.Stewart at reddeer.ca> 
Cc: "users at geoext.org" <users at geoext.org> 
Gesendet: 16:32 Mittwoch, 22.Februar 2012
Betreff: Re: [Users] Add overview map to mappanel
 

Hi,

Thanks for the example.....it kind of works, but the map is dark blue, and my layers are not displayed!

cheers,

Rob





________________________________
 Von: Andrew Stewart <Andrew.Stewart at reddeer.ca>
An: 'Robert Buckley' <robertdbuckley at yahoo.com> 
Cc: "users at geoext.org" <users at geoext.org> 
Gesendet: 16:08 Mittwoch, 22.Februar 2012
Betreff: RE: [Users] Add overview map to mappanel
 

First make a new 
window to hold the overview map, put the function as the listener for 
"after_layout". Here is how I declare mine -
 
 
overview_window = new 
Ext.Window({
        title: "Overview 
Window",
        bodyBorder: 
false,
        closeAction: 
"hide",
        collapsible: 
true,
        titleCollapse: 
true,
        width: 
200,
        resizable: 
false,
        closable: 
false,
        html: '<div 
id="overviewmap"></div>',
        
listeners: 
{
            
afterlayout: 
{
                
fn: 
addOverview,
                
single: 
true
            
}
        }
    
});
    overview_window.show();
    
overview_window.alignTo(document.body, "bl", [10, -125]);
    
    function addOverview() {
    var b = 
{
        div: 
Ext.get("overviewmap"),
        
mapOptions: 
{
            
maxResolution: 
190,
            
minResolution: 
190,
            
numZoomLevels: 1
        
},
        id: 
"overview_map",
        layers: 
[layer_Overview.clone()]
    
},
        a = new 
OpenLayers.Control.OverviewMap(b);
        
a.isSuitableOverview = function () 
{
        return 
true
    };
        
map.addControl(a) 
    }
 
 

________________________________
 From: users-bounces at geoext.org 
[mailto:users-bounces at geoext.org] On Behalf Of Robert 
Buckley
Sent: February 22, 2012 12:30 AM
To: users at geoext.org
Subject: [Users] Add overview map to 
mappanel


Hi,

I want to add an overviewmap with an rectangle showing the current extent 
of the mappanel and one wms layer as reference.

I read this...

http://www.geoext.org/pipermail/users/2010-February/000593.html 


But cannot see where the following should be place...


addOverview: = function() {
var mapOptions = { maxExtent: new OpenLayers.Bounds(180000, 397000,200000, 414000), maxResolution: 500, projection: "EPSG:28992", units: "m" };


..is this part of a panel, or the mappanel?

does anyone know where this should go...or is there a better method to produce a simple yet effective overview map?

Rob

________________________________
 [This message has been scanned for security content threats and 
viruses.]

[The City of Red Deer I.T. Services asks that you please 
consider the environment before printing this e-mail.]


________________________________
 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. 


_______________________________________________
Users mailing list
Users at geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20120222/ca584fb0/attachment.htm 


More information about the Users mailing list