[OpenLayers-Dev] overviewmap and non-WMS baselayers
Steven M. Ottens
steven at minst.net
Thu Oct 4 08:19:27 EDT 2007
Hi All,
I'm struggling to get overviewmap working with google sperical mercator.
The closest I've gotten is that you need to resize the window to get the
extent correct. I've used the following html file:
http://rafb.net/p/Zf97Cd94.html
At last I decided to investigate if it works with normal/old fashioned
google or any other non-WMS layer for that matter.
So I tried to just add an overviewmap to the plain google.html example
resulting in this code:
http://rafb.net/p/wLXBX581.html
But here I get the same error I initially got in google-sm:
bounds has no properties
var center = bounds.getCenterLonLat();
This is to trace back to a missing baseLayer in the overviewMap; Map.js
calls this function:
1282 getMaxExtent: function () {
1283 var maxExtent = null;
1284 if (this.baseLayer != null) {
1285 maxExtent = this.baseLayer.maxExtent;
1286 }
1287 return maxExtent;
1288 },
and this.baseLayer = null in this case
To investigate further I tried TMS this way:
http://rafb.net/p/cEKu5z90.html
And this time it gave me the wrong extent, just like google-sm in the
first example. So now I am wondering if there's something in overviewmap
wrong, or in the way I invoke overviewmap. If anyone with a better
insight in OverviewMap.js can help me out, I'd really appreciate it.
regards,
Steven
More information about the Dev
mailing list