[Users] OverviewMap
Nils Krueger
nik1166 at googlemail.com
Tue Feb 23 20:15:50 CET 2010
Thank you for your quick answer. I'm interested for a such functionality
:-))
2010/2/23 Matt Priour <mpriour at kestrelcomputer.com>
> 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.
>
> This may be a good idea for a new widget. If others are interested in such
> functionality, I can file a ticket.
>
> Matt Priour
>
> *From:* Nils Krueger <nik1166 at googlemail.com>
> *Sent:* Tuesday, February 23, 2010 11:39 AM
> *To:* users at geoext.org
> *Subject:* [Users] OverviewMap
>
> Hello...
>
> I would like to show the OverviewMap in an own suitable panel display.
> Unfortunately, it doesn’t work. If so, is there any example? Or can anybody
> show me how to do this.
>
> Thank you for your help!
>
> Nils
>
> <html>
> <head>
> <title>OverMap</title>
> <!--link rel="stylesheet" type="text/css" href="
> http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" /-->
> <link rel="stylesheet" type="text/css"
> href="./lib/ext/resources/css/ext-all.css" />
>
> <!--script type="text/javascript" src="
> http://extjs.cachefly.net/builds/ext-cdn-771.js"></script-->
> <script type="text/javascript"
> src="./lib/ext/adapter/ext/ext-base.js"></script>
> <script type="text/javascript" src="./lib/ext/ext-all.js"></script>
>
> <script src="http://openlayers.org/api/2.8/OpenLayers.js"></script>
>
>
> <script src="./lib/GeoExt/script/GeoExt.js"
> type="text/javascript"></script>
>
>
> <script type="text/javascript">
> var panel, map;
> Ext.onReady(function(){
>
> var options_31467 = {
> projection: new OpenLayers.Projection("EPSG:31467"),
> controls: [],
> maxExtent: new OpenLayers.Bounds(3336848, 5208708, 3661609,
> 5575555),
> maxResolution: "auto",
> numZoomLevels: 20,
> units: 'm',
> };
>
>
> // create a new map
> map = new OpenLayers.Map('map', options_31467);
>
> // create base layer
> var KreiseBW = new OpenLayers.Layer.WMS(
> "KreiseBW",
> "/geoserver/wms",
> {
> layers: 'topp:KreiseBW',
> isBaseLayer:true,
> }
>
> );
>
> // create overview map
> var ovMapLayer = new OpenLayers.Layer.WMS(
> "Kreise",
> "/geoserver/wms",
> {
> layers: 'topp:BW',
> }
> );
>
> var ovMap = {
> mapOptions: {
> projection: map.getProjection(),
> maxExtent: map.getMaxExtent()
> },
> layers: [ovMapLayer]
> };
>
> //add Layers
> map.addLayer(KreiseBW);
>
> //add Controls
> map.addControl(new OpenLayers.Control.LayerSwitcher());
> map.addControl(new OpenLayers.Control.Navigation());
> map.addControl(new OpenLayers.Control.PanZoomBar({zoomWorldIcon:
> 'true'}));
>
> //map.addControl(new OpenLayers.Control.OverviewMap(ovMap));
>
> map.zoomToMaxExtent();
>
> //create layout
> var overmap = new Ext.Panel({
> title: 'Overmap',
> // ???
> control: new OpenLayers.Control.OverviewMap(ovMap),
> //items: ovmap,
> height:150
> });
>
> var toc = new Ext.Panel({
> title:'TOC',
> html: '<empty panel>',
> cls:'empty'
> });
>
> var west = new Ext.Panel({
> region:'west',
> margins:'5 0 5 5',
> split:true,
> width: 210,
> layout:'accordion',
> items: [overmap, toc]
> });
>
> var map_panel = new GeoExt.MapPanel({
> region:'center',
> map: map,
> });
>
> var view = new Ext.Viewport({
> layout:'border',
> items:[west, map_panel]
> });
> });
> </script>
> </head>
> <body>
> </body>
> </html>
>
> ------------------------------
>
> _______________________________________________
> 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/20100223/24015da9/attachment-0001.htm
More information about the Users
mailing list