[OpenLayers-Users] why no overlay on Virtual Earth basemaps?
Ernie Buford
ebuford at uvm.edu
Thu May 17 09:20:11 PDT 2012
Having fun getting started with OpenLayers, but I've hit a curious snag....
I have a set of map tiles created using Arc2Earth, and they overlay
nicely on Google, Yahoo, and OSM basemap data.... but no luck with
Bing/Virtual Earth. Is this not currently possible, or (more likely) am
I missing some critical detail?
I have modified several OL examples (e.g.,
OL_spherical-mercator-example.html and some from the 2.10 Beginner's
Guide) by adding an XYZ layer like this:
// create slope overlay layer
var slope = new OpenLayers.Layer.XYZ(
"VT Slope",
"http://myserver/slope/${z}/${x}/${y}.png",
{
'opacity': 0.6, visibility: false,
'isBaseLayer': false,'wrapDateLine': true
}
);
At times I've added the 'sphericalMercator: true' option, but it does
not seem to matter.
I've added this exact chunk of code to several working examples. The
slope layer shows up over any of the aforementioned basemaps except Bing
(which I've tried accessing via OpenLayers.Layer.VirtualEarth as well as
directly with the newer OpenLayers.Layer.Bing).
Why won't this work with the Bing/VE basemap?
Should I be using a different method for using this type of tile cache
as an overlay in OL?
Ernie
More information about the Users
mailing list