[OpenLayers-Users] Virtual Earth map troubles in IE7
David Wright
DWright at ngs.org
Tue Jul 29 20:41:53 EDT 2008
Greetings,
I'm trying to use MetaCarta GTS collections on Virtual Earth maps. With
the hosted OpenLayers.js, I get a script error in IE7 when panning after
I zoom all the way out. I also get the error when initializing the map
to global scale using a "1" like this: mccontrol.map.setCenter(new
OpenLayers.LonLat(-95,38), 1);
Here's the error:
Line 51; Char 37; Invalid Argument; Code 0
Heres the URL: http://www.metalens.org/mcve/
Thanks for any insight you can share.
Here's the page code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252"/>
<script type="text/javascript"
src='http://216.17.239.67/developers/tools?version=1.0.0&file=GeoSearch.
js'></script>
<script type="text/javascript"
src="http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js"></script>
<!--<script type="text/javascript"
src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1"></scr
ipt>-->
<!--<script type="text/javascript"
src="http://www.openlayers.org/api/OpenLayers.js"></script>-->
<script defer="defer" type="text/javascript">
<!--
function metacarta_init(){
mccontrol = MetaCarta.GeoSearch.Init({'applianceHost':
'gts.metalens.org', 'textDivId': 'list', 'mapDivId': 'map',
'searchParams': [''] });
// add new layers
var ve = new OpenLayers.Layer.VirtualEarth("ve", {'minZoomLevel': 2,
'maxZoomLevel': 10, 'wrapDateLine': true, 'displayOutsideMaxExtent':
true});
// add a LayerSwitcher
//mccontrol.map.addControl(new OpenLayers.Control.LayerSwitcher());
//mccontrol.map.removeControl(LayerSwitcher)
//add layers
mccontrol.map.addLayers([ve]);
mccontrol.map.setBaseLayer(ve);
mccontrol.map.setCenter(new OpenLayers.LonLat(-95,38), 2);
//mccontrol.map.zoomToMaxZoomLevel(5);
}
-->
</script>
<title>NGS Collections</title>
</head>
<body onload="metacarta_init()";>
<div id='map' style='width:75%; height:100%; float:right;'></div>
<div id='list' style='width:25%; height:100%;'></div>
</body>
</html>
David Wright | National Geographic Maps
210 Beaver Brook Canyon Road | Evergreen, CO 80439
303.327.3108 off | 720.210.7045 mob | 303.670.2647 fax
dwright at ngs.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080729/ea8d18fd/attachment.html
More information about the Users
mailing list