I have an application using OL 2.9 that allows users to geocode addresses in
various countries, and then centre the location.
The app has an almost full-screen map, which allows the user to switch
between Google, Bing, and OSM. It starts up in Google Street. The geocoding
function allows to user to centre the map on address details returned (just
using the OL setCenter() function).
When using IE8, I have a problem using OpenStreetMaps - the map doesn't
render properly after panning if zoomed right in.
The maps starts up in Queensland. The problem appears if the user switches
from Google Street to OSM. (Because Google supports more layers than OSM,
switching will cause OSM to be zoomed into its maximum level.) They then
geocode an address in, say, Melbourne, and hit the button to centre the
location. Only the first tile (top LH) will load.
I can see from using Fiddler that all the OSM tiles are getting requested.
However, it looks like maybe the map canvas has shrunk to the size of one
tile. You can drag the visible tile, but not the empty canvas. Zooming fixes
the problem, as does changing the browser window size (e.g. by turning a
toolbar off).
The problem doesn't occur with FireFox, and it seems to only affect OSM.
I tried testing it side-by-side in IE7 using IE Tester. It works correctly
in IE7. However, If I add <meta http-equiv="X-UA-Compatible"
content="IE=EmulateIE7" />, I get slightly different results - a whole top
row appears, but again not the entire map.
I tried looking at the DOM in DebugBar - unfortunately, it doesn't respond
properly if the map hasn't loaded properly. I'm not sure if this is
indicative of anything. It's possible I have a layout bug somewhere, but
don't know how to track it down.
I'm not sure if posing any code will be useful - the overall app is fairly
simple, taken largely from the online demos. The OSM layer is just
var lyrBaseOpenStreetMaps = new OpenLayers.Layer.OSM(
"Open Street"
)
Rohan Parkes
Melbourne Australia
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users