[OpenLayers-Users] Overview map resolution difficulties
youknowho
iansgis at GMAIL.COM
Thu Jun 19 19:05:07 EDT 2008
I'm still struggling with this. I cannot change the resolution in tilecache
or openlayers without interfering with my main map and causing
shifted/incorrectly positioned data. I changed the overview to use the
isSuitableOverview function as well but this has not solved the problem.
OL:
var options = {controls:[], maxExtent:new OpenLayers.Bounds(-180, -90, 180,
90), resolutions:
[0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],
restrictedExtent:new OpenLayers.Bounds(-180, -90, 180, 90)}
var ovOptions = {isSuitableOverview: function() {return true;},
mapOptions:{maxExtent:new OpenLayers.Bounds(-180, -90, 180, 90),
numZoomLevels:1, maxResolution:2.0}}
var map = new OpenLayers.Map('map', options);
var ovm = new OpenLayers.Control.OverviewMap(ovOptions);
map.addControl(ovm);
TC:
[basic]
type=WMS
url=http://host/cgi-bin/mapserv?map=/path/to/maps/WMS.map&
layers=worldCountriesPolys,mexico_states_poly,mexico_states_line,us_states_poly,us_states_line
bbox=-180, -90, 180, 90
resolutions=0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,
0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125
I get the usual resolution index error:
An error occurred: can't find resolution index for 2.000000. Available
resolutions are:
[0.3515625, 0.17578125, 0.087890625, 0.0439453125, 0.02197265625,
0.010986328125, 0.0054931640625, 0.00274658203125, 0.001373291015625,
0.0006866455078125, 0.00034332275390625, 0.000171661376953125,
8.58306884765625e-05, 4.291534423828125e-05]
and I understand why it happens, but if I cannot change the resolution in
openlayers or tilecache I do not see how to resolve this.
--
View this message in context: http://www.nabble.com/Overview-map-resolution-difficulties-tp17936211p18019995.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list