I am trying to get my overview map to work with either an Image layer of my
overview layers which I pasted into a gif or just my layers themselves
(WMS). When I use the image layer for some reason my rectangle is not
positioned properly in the center of the map (it is to the far left corner)
I have tried using updateRectToMap: true and this makes it move slightly
more to the bottom but not proper. I am having an issue also with trying to
use a WMS layer instead of the image (which is what I want originally). As
soon as I define a layer for the overview map the view gets all messed and I
don't see the layer as it is zoomed in too much. However when I use a base
layer for my map everything is fine. What gives, do you have to use a base
layer only for the overview map to work properly? If so, how do I use the
base layer for my overview map only and not get it to show in my regular
map? Appreciate any assistance. Below is my code -
- Graphic layer overview try, which makes the rectangle appear to the top
left and when I zoom out/zoom in move around the map the overview and the
position of the recntagle do not change at all.
var graphic = new OpenLayers.Layer.Image(
'City Lights',
'../images/overview_image.PNG',
new OpenLayers.Bounds(0, 0, 201, 129),
new OpenLayers.Size(201, 129)
);
function addOverview() {
var controlOptions = {
div: Ext.get('overviewmap'),
/* destroy issues in IE to be fixed, workaround for now
*/
destroy: function() {},
layers: [graphic],
updateRectToMap: true
};
var overview = new
OpenLayers.Control.OverviewMap(controlOptions);
map.addControl(overview);
};
My other overview map - only works when the layer is made a base layer but
then it just shows on my map because I have to add the layer to the map for
it to work with the overview. If I try to set it specifally to the layer
layer_Overview then i cannot see the layer anymore
//Overview Map Layer
var layer_Overview = new OpenLayers.Layer.WMS("Overview Layer",
"http://ITS701X5J1/RedWMS/Request.aspx",
{layers: ['OVERVIEW_County, OVERVIEW_City_Boundaries,
OVERVIEW_Roads, OVERVIEW_river, OVERVIEW_Roads_Highways'], isBaseLayer:
true});
map.addLayers([layer_Overview, etc, etc])
var overview2 = new OpenLayers.Control.OverviewMap();
map.addControl(overview2);
overview2.maximizeControl();
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Overview-map-issues-can-t-get-image-layer-working-or-just-regular-WMS-layer-tp5604135p5604135.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users