[OpenLayers-Users] Works well in FF, but "LOST A ' }' " wirth IE6
Chen kuja
eiclkun at gmail.com
Tue Oct 28 09:59:12 EDT 2008
Hi all,
I set up a wms months ago, it worked well with both FireFox & IE6, so well
that i kinda of ignored it(sigh...). Yesterday I accidentally found it
couldn't work. It alert me with "lost a } " while using IE6, but i am sure
every '{' & '}' is in location it should be. Besides, it works pretty well
with FireFox(and firebug reports nothing wrong).
After several attempts, I found a solution--remove " <script src="
http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAEqxF-PIoeG2SygdIxh_zcRT4OcjGrHYmKSPzxaVm_-wl_OLD3BSYx-EjqQulsX6Hf2LivfHYwgtdjQ"
type="text/javascript"></script>", which is google maps' key. The removal
works great, no more "lost a' }' problem", and also, no more google maps...
I haven't paid much attention to update cause the busy job, did I miss
anything changed? Or just some typos I made unconsciously in those months.
here comes the html, and the url http://kuja.oicp.net (I'll keep the
server running)
<html>
<head>
<script src="
http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAEqxF-PIoeG2SygdIxh_zcRT4OcjGrHYmKSPzxaVm_-wl_OLD3BSYx-EjqQulsX6Hf2LivfHYwgtdjQ"
type="text/javascript"></script>
<script type="text/javascript" src="js/ol/OpenLayers.js"></script>
<script src="js/proj4js/lib/proj4js-compressed.js"
type="text/javascript"></script>
<script src="js/proj4js/lib/defs/EPSG900913.js"
type="text/javascript"></script>
<script src="js/proj4js/lib/defs/EPSG4326.js"
type="text/javascript"></script>
<script type="text/javascript">
var map, Laye;
var G_SATELLITE_MAP
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
OpenLayers.Util.onImageLoadErrorColor = "transparent";
function init() {
var options = {
projection : "EPSG:900913",
maxExtent : new OpenLayers.Bounds(12727216.047735045,
3563238.963082024, 12731224.662598498, 3566021.113954254),
maxResolution : 156543.0339,
maxZoomLevel : 20,
numZoomLevels : 20,
units : "m",
controls : []
};
map = new OpenLayers.Map( 'map',options);
var base = new OpenLayers.Layer.WMS( "电子地图", "
http://kuja.oicp.net/tilecache/tilecache.py?",
{ layers: 'hzau'} );
base.setIsBaseLayer(false);
var gsat = new OpenLayers.Layer.Google("Google卫星图片",
{type: G_SATELLITE_MAP, 'sphericalMercator': true});
gsat.setIsBaseLayer(true);
map.addLayers([base, gsat]);
map.addControl(new OpenLayers.Control.PanZoomBar(), new
OpenLayers.Pixel(2,30));
map.addControl(new OpenLayers.Control.MouseDefaults());
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.setCenter(new OpenLayers.LonLat(12729250.0836,3564650.83), 15);
mp = new OpenLayers.Control.MousePosition({div: $('coord02')});
mp.displayProjection = new
OpenLayers.Projection("EPSG:4326");
map.addControl(mp);
map.addControl( new OpenLayers.Control.MousePosition ({div:
$('coord01')}) );
};
</script>
</head><body onload="init()"><div id="map"></div>
Regards,
kuja
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081028/844eb1ed/attachment.html
More information about the Users
mailing list