[Users] Rendering Overviewmap in Ext.Panel using viewport
Eric Lemoine
eric.lemoine at camptocamp.com
Tue Sep 28 09:32:37 CEST 2010
On Mon, Sep 27, 2010 at 11:21 PM, Andrew Stewart
<Andrew.Stewart at reddeer.ca> wrote:
> 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!
Here's what we've used for wrapping a MousePosition in a BoxComponent:
MousePositionBox = Ext.extend(Ext.BoxComponent, {
map: null,
afterRender: function() {
var control = new OpenLayers.Control.MousePosition({
div: this.getEl().dom,
numDigits: 0,
prefix: "Coordinates (m):"
});
this.map.addControl(control);
MousePositionBox.superclass.afterRender.apply(this, arguments);
}
});
Applying this to the OverviewMap might just work.
Cheers,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
More information about the Users
mailing list